function TermBreadcrumbBuilder::__construct

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

Constructs the TermBreadcrumbBuilder.

Parameters

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

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

File

core/modules/taxonomy/src/TermBreadcrumbBuilder.php, line 41

Class

TermBreadcrumbBuilder
Provides a custom taxonomy breadcrumb builder that uses the term hierarchy.

Namespace

Drupal\taxonomy

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityRepositoryInterface $entity_repository) {
    $this->entityTypeManager = $entity_type_manager;
    $this->entityRepository = $entity_repository;
}

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