public function TermBreadcrumbBuilder::applies in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/taxonomy/src/TermBreadcrumbBuilder.php \Drupal\taxonomy\TermBreadcrumbBuilder::applies()
Whether this breadcrumb builder should be used to build the breadcrumb.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
Return value
bool TRUE if this builder should be used or FALSE to let other builders decide.
Overrides BreadcrumbBuilderInterface::applies
File
- core/
modules/ taxonomy/ src/ TermBreadcrumbBuilder.php, line 51 - Contains \Drupal\taxonomy\TermBreadcrumbBuilder.
Class
- TermBreadcrumbBuilder
- Provides a custom taxonomy breadcrumb builder that uses the term hierarchy.
Namespace
Drupal\taxonomyCode
public function applies(RouteMatchInterface $route_match) {
return $route_match
->getRouteName() == 'entity.taxonomy_term.canonical' && $route_match
->getParameter('taxonomy_term') instanceof TermInterface;
}