function BookAdminEditForm::__construct
Same name in other branches
- 8.9.x core/modules/book/src/Form/BookAdminEditForm.php \Drupal\book\Form\BookAdminEditForm::__construct()
- 10 core/modules/book/src/Form/BookAdminEditForm.php \Drupal\book\Form\BookAdminEditForm::__construct()
- 11.x core/modules/book/src/Form/BookAdminEditForm.php \Drupal\book\Form\BookAdminEditForm::__construct()
Constructs a new BookAdminEditForm.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $node_storage: The custom block storage.
\Drupal\book\BookManagerInterface $book_manager: The book manager.
\Drupal\Core\Entity\EntityRepositoryInterface|null $entity_repository: The entity repository service.
File
-
core/
modules/ book/ src/ Form/ BookAdminEditForm.php, line 55
Class
- BookAdminEditForm
- Provides a form for administering a single book's hierarchy.
Namespace
Drupal\book\FormCode
public function __construct(EntityStorageInterface $node_storage, BookManagerInterface $book_manager, EntityRepositoryInterface $entity_repository = NULL) {
$this->nodeStorage = $node_storage;
$this->bookManager = $book_manager;
if (!$entity_repository) {
@trigger_error('The entity.repository service must be passed to ' . __NAMESPACE__ . '\\BookAdminEditForm::__construct(). It was added in drupal:9.2.0 and will be required before drupal:10.0.0.', E_USER_DEPRECATED);
$entity_repository = \Drupal::service('entity.repository');
}
$this->entityRepository = $entity_repository;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.