You are here

public function ViewsBreadCrumbBuilder::applies in Views breadcrumb 8

Same name and namespace in other branches
  1. 8.2 src/Breadcrumb/ViewsBreadcrumbBuilder.php \Drupal\views_breadcrumb\Breadcrumb\ViewsBreadCrumbBuilder::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/Breadcrumb/ViewsBreadcrumbBuilder.php, line 16

Class

ViewsBreadCrumbBuilder

Namespace

Drupal\views_breadcrumb\Breadcrumb

Code

public function applies(RouteMatchInterface $attributes) {
  $parameters = $attributes
    ->getParameters()
    ->all();
  if (!empty($parameters['view_id'])) {
    return TRUE;
  }
}