function ForumNodeBreadcrumbBuilder::applies

Same name in other branches
  1. 8.9.x core/modules/forum/src/Breadcrumb/ForumNodeBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder::applies()
  2. 10 core/modules/forum/src/Breadcrumb/ForumNodeBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder::applies()
  3. 11.x core/modules/forum/src/Breadcrumb/ForumNodeBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder::applies()

Overrides BreadcrumbBuilderInterface::applies

File

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

Class

ForumNodeBreadcrumbBuilder
Breadcrumb builder for forum nodes.

Namespace

Drupal\forum\Breadcrumb

Code

public function applies(RouteMatchInterface $route_match) {
    return $route_match->getRouteName() == 'entity.node.canonical' && $route_match->getParameter('node') && $this->forumManager
        ->checkNodeType($route_match->getParameter('node'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.