Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BreadcrumbBuilderInterface.php

function BreadcrumbBuilderInterface::applies

Whether this breadcrumb builder should be used to build the breadcrumb.

@todo Uncomment new method parameters before drupal:12.0.0, see https://www.drupal.org/project/drupal/issues/3459277.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match. phpcs:disable Drupal.Commenting

\Drupal\Core\Cache\CacheableMetadata $cacheable_metadata: The cacheable metadata to add to if your check varies by or depends on something. Anything you specify here does not have to be repeated in the build() method as it will be merged in automatically. phpcs:enable

Return value

bool TRUE if this builder should be used or FALSE to let other builders decide.

5 methods override BreadcrumbBuilderInterface::applies()
BreadcrumbManager::applies in core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php
Whether this breadcrumb builder should be used to build the breadcrumb.
CommentBreadcrumbBuilder::applies in core/modules/comment/src/CommentBreadcrumbBuilder.php
Whether this breadcrumb builder should be used to build the breadcrumb.
HelpBreadcrumbBuilder::applies in core/modules/help/src/HelpBreadcrumbBuilder.php
Whether this breadcrumb builder should be used to build the breadcrumb.
PathBasedBreadcrumbBuilder::applies in core/modules/system/src/PathBasedBreadcrumbBuilder.php
Whether this breadcrumb builder should be used to build the breadcrumb.
TermBreadcrumbBuilder::applies in core/modules/taxonomy/src/TermBreadcrumbBuilder.php
Whether this breadcrumb builder should be used to build the breadcrumb.

File

core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php, line 31

Class

BreadcrumbBuilderInterface
Defines an interface for classes that build breadcrumbs.

Namespace

Drupal\Core\Breadcrumb

Code

public function applies(RouteMatchInterface $route_match);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal