You are here

public function TermBreadcrumbBuilder::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/TermBreadcrumbBuilder.php \Drupal\taxonomy\TermBreadcrumbBuilder::__construct()

Constructs the TermBreadcrumbBuilder.

Parameters

\Drupal\Core\Entity\EntityManagerInterface $entityManager: The entity manager.

File

core/modules/taxonomy/src/TermBreadcrumbBuilder.php, line 43
Contains \Drupal\taxonomy\TermBreadcrumbBuilder.

Class

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

Namespace

Drupal\taxonomy

Code

public function __construct(EntityManagerInterface $entityManager) {
  $this->entityManager = $entityManager;
  $this->termStorage = $entityManager
    ->getStorage('taxonomy_term');
}