function BookBreadcrumbBuilder::__construct

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

Constructs the BookBreadcrumbBuilder.

Parameters

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

\Drupal\Core\Session\AccountInterface $account: The current user account.

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

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager service.

File

core/modules/book/src/BookBreadcrumbBuilder.php, line 63

Class

BookBreadcrumbBuilder
Provides a breadcrumb builder for nodes in a book.

Namespace

Drupal\book

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, AccountInterface $account, EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager) {
    $this->nodeStorage = $entity_type_manager->getStorage('node');
    $this->account = $account;
    $this->entityRepository = $entity_repository;
    $this->languageManager = $language_manager;
}

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