You are here

public function GroupContentTypeBreadcrumbBuilder::applies in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Breadcrumb/GroupContentTypeBreadcrumbBuilder.php \Drupal\group\Breadcrumb\GroupContentTypeBreadcrumbBuilder::applies()

@inheritdoc

Overrides BreadcrumbBuilderInterface::applies

File

src/Breadcrumb/GroupContentTypeBreadcrumbBuilder.php, line 21

Class

GroupContentTypeBreadcrumbBuilder
Provides a custom breadcrumb builder for group content type paths.

Namespace

Drupal\group\Breadcrumb

Code

public function applies(RouteMatchInterface $route_match) {

  // Only apply to paths containing a group content type.
  if ($route_match
    ->getParameter('group_content_type') instanceof GroupContentTypeInterface) {
    return TRUE;
  }
}