public function RecipeBreadcrumbBuilder::applies in Recipe 8.2
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/
RecipeBreadcrumbBuilder.php, line 21
Class
- RecipeBreadcrumbBuilder
- Builds breadcrumbs for Recipe nodes.
Namespace
Drupal\recipeCode
public function applies(RouteMatchInterface $route_match) {
$node = $route_match
->getParameter('node');
$match = $node instanceof NodeInterface && $node
->getType() == 'recipe';
return $match;
}