public function ThunderArticleBreadcrumbBuilder::applies in Thunder 8.5
Same name and namespace in other branches
- 8.2 modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php \Drupal\thunder_article\Breadcrumb\ThunderArticleBreadcrumbBuilder::applies()
- 8.3 modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php \Drupal\thunder_article\Breadcrumb\ThunderArticleBreadcrumbBuilder::applies()
- 8.4 modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php \Drupal\thunder_article\Breadcrumb\ThunderArticleBreadcrumbBuilder::applies()
- 6.2.x modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php \Drupal\thunder_article\Breadcrumb\ThunderArticleBreadcrumbBuilder::applies()
- 6.0.x modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php \Drupal\thunder_article\Breadcrumb\ThunderArticleBreadcrumbBuilder::applies()
- 6.1.x modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php \Drupal\thunder_article\Breadcrumb\ThunderArticleBreadcrumbBuilder::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
- modules/
thunder_article/ src/ Breadcrumb/ ThunderArticleBreadcrumbBuilder.php, line 110
Class
- ThunderArticleBreadcrumbBuilder
- Class to define the menu_link breadcrumb builder.
Namespace
Drupal\thunder_article\BreadcrumbCode
public function applies(RouteMatchInterface $route_match) {
// This breadcrumb apply only for all articles.
$parameters = $route_match
->getParameters()
->all();
if (isset($parameters['node']) && is_object($parameters['node'])) {
return $parameters['node']
->getType() == 'article';
}
return FALSE;
}