You are here

public function TermBreadcrumbBuilder::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/src/TermBreadcrumbBuilder.php \Drupal\taxonomy\TermBreadcrumbBuilder::__construct()
  2. 10 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;
}