You are here

public function IngredientBreadcrumbBuilder::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

modules/ingredient/src/IngredientBreadcrumbBuilder.php, line 21

Class

IngredientBreadcrumbBuilder
Builds breadcrumbs for Ingredient entities.

Namespace

Drupal\ingredient

Code

public function applies(RouteMatchInterface $route_match) {
  $ingredient = $route_match
    ->getParameter('ingredient');
  $match = $ingredient instanceof IngredientInterface;
  return $match;
}