You are here

public function ForumListingBreadcrumbBuilder::applies in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder::applies()
  2. 10 core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder::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

core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php, line 16

Class

ForumListingBreadcrumbBuilder
Provides a breadcrumb builder base class for forum listing pages.

Namespace

Drupal\forum\Breadcrumb

Code

public function applies(RouteMatchInterface $route_match) {
  return $route_match
    ->getRouteName() == 'forum.page' && $route_match
    ->getParameter('taxonomy_term');
}