function BookExport::__construct

Same name in other branches
  1. 9 core/modules/book/src/BookExport.php \Drupal\book\BookExport::__construct()
  2. 8.9.x core/modules/book/src/BookExport.php \Drupal\book\BookExport::__construct()
  3. 11.x core/modules/book/src/BookExport.php \Drupal\book\BookExport::__construct()

Constructs a BookExport object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\book\BookManagerInterface $book_manager: The book manager.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.

File

core/modules/book/src/BookExport.php, line 54

Class

BookExport
Provides methods for exporting book to different formats.

Namespace

Drupal\book

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, BookManagerInterface $book_manager, EntityRepositoryInterface $entity_repository) {
    $this->nodeStorage = $entity_type_manager->getStorage('node');
    $this->viewBuilder = $entity_type_manager->getViewBuilder('node');
    $this->bookManager = $book_manager;
    $this->entityRepository = $entity_repository;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.