public function ForumNodeBreadcrumbBuilder::applies in Drupal 10
Same name and namespace in other branches
- 8 core/modules/forum/src/Breadcrumb/ForumNodeBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder::applies()
- 9 core/modules/forum/src/Breadcrumb/ForumNodeBreadcrumbBuilder.php \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder::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/ ForumNodeBreadcrumbBuilder.php, line 16
Class
- ForumNodeBreadcrumbBuilder
- Breadcrumb builder for forum nodes.
Namespace
Drupal\forum\BreadcrumbCode
public function applies(RouteMatchInterface $route_match) {
return $route_match
->getRouteName() == 'entity.node.canonical' && $route_match
->getParameter('node') && $this->forumManager
->checkNodeType($route_match
->getParameter('node'));
}