public function BookUninstallValidator::__construct in Zircon Profile 8
Same name in this branch
- 8 core/modules/book/src/BookUninstallValidator.php \Drupal\book\BookUninstallValidator::__construct()
- 8 core/modules/book/src/ProxyClass/BookUninstallValidator.php \Drupal\book\ProxyClass\BookUninstallValidator::__construct()
Same name and namespace in other branches
- 8.0 core/modules/book/src/BookUninstallValidator.php \Drupal\book\BookUninstallValidator::__construct()
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 47 - Contains \Drupal\book\BookUninstallValidator.
Class
- BookUninstallValidator
- Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored.
Namespace
Drupal\bookCode
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;
}