You are here

public function CommentBreadcrumbBuilder::applies in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/comment/src/CommentBreadcrumbBuilder.php \Drupal\comment\CommentBreadcrumbBuilder::applies()
  2. 10 core/modules/comment/src/CommentBreadcrumbBuilder.php \Drupal\comment\CommentBreadcrumbBuilder::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/comment/src/CommentBreadcrumbBuilder.php, line 38

Class

CommentBreadcrumbBuilder
Class to define the comment breadcrumb builder.

Namespace

Drupal\comment

Code

public function applies(RouteMatchInterface $route_match) {
  return $route_match
    ->getRouteName() == 'comment.reply' && $route_match
    ->getParameter('entity');
}