public function ContextBreadcrumbBuilder::applies in Context Active Trail 8
Same name and namespace in other branches
- 8.2 src/ContextBreadcrumbBuilder.php \Drupal\context_active_trail\ContextBreadcrumbBuilder::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
- src/
ContextBreadcrumbBuilder.php, line 87
Class
- ContextBreadcrumbBuilder
- Build breadcrumbs based on active trail from context.
Namespace
Drupal\context_active_trailCode
public function applies(RouteMatchInterface $route_match) {
foreach ($this->contextManager
->getActiveReactions('active_trail') as $reaction) {
if ($reaction
->setsBreadcrumbs()) {
return $this->configuration = $reaction
->getConfiguration();
}
}
return FALSE;
}