BookUninstallValidator::__construct

public BookUninstallValidator::__construct(BookOutlineStorageInterface $book_outline_storage, QueryFactory $query_factory, TranslationInterface $string_translation)

Constructs a new BookUninstallValidator.

Parameters

\Drupal\book\BookOutlineStorageInterface $book_outline_storage: The book outline storage.

\Drupal\Core\Entity\Query\QueryFactory $query_factory: The entity query factory.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

File

core/modules/book/src/BookUninstallValidator.php, line 42

Class

BookUninstallValidator
Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored.

Namespace

Drupal\book

Code

public function __construct(BookOutlineStorageInterface $book_outline_storage, QueryFactory $query_factory, TranslationInterface $string_translation) {
  $this->bookOutlineStorage = $book_outline_storage;
  $this->entityQuery = $query_factory->get('node');
  $this->stringTranslation = $string_translation;
}
doc_Drupal
2016-10-29 08:48:35
Comments
Leave a Comment

Please login to continue.