You are here

public function BookUninstallValidator::__construct in Drupal 9

Same name in this branch
  1. 9 core/modules/book/src/BookUninstallValidator.php \Drupal\book\BookUninstallValidator::__construct()
  2. 9 core/modules/book/src/ProxyClass/BookUninstallValidator.php \Drupal\book\ProxyClass\BookUninstallValidator::__construct()
Same name and namespace in other branches
  1. 8 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\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\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, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation) {
  $this->bookOutlineStorage = $book_outline_storage;
  $this->entityTypeManager = $entity_type_manager;
  $this->stringTranslation = $string_translation;
}