You are here

public function CatalogBreadcrumbBuilder::applies in Commerce Demo 8

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/CatalogBreadcrumbBuilder.php, line 63

Class

CatalogBreadcrumbBuilder
Builds a catalog breadcrumb.

Namespace

Drupal\commerce_demo

Code

public function applies(RouteMatchInterface $route_match) {
  return $route_match
    ->getRouteName() == 'view.product_catalog.page_1' && $route_match
    ->getParameter('facets_query');
}