function SkippablePathBasedBreadcrumbBuilder::build

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/menu_test/src/SkippablePathBasedBreadcrumbBuilder.php \Drupal\menu_test\SkippablePathBasedBreadcrumbBuilder::build()

Builds the breadcrumb.

There is no need to add any cacheable metadata that was already added in applies() as that will be automatically added for you.

Parameters

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

Return value

\Drupal\Core\Breadcrumb\Breadcrumb A breadcrumb.

Overrides BreadcrumbBuilderInterface::build

File

core/modules/system/tests/modules/menu_test/src/SkippablePathBasedBreadcrumbBuilder.php, line 36

Class

SkippablePathBasedBreadcrumbBuilder
A path-based breadcrumb builder can be skipped from applying.

Namespace

Drupal\menu_test

Code

public function build(RouteMatchInterface $route_match) : Breadcrumb {
  return $this->pathBasedBreadcrumbBuilder
    ->build($route_match);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.