function LayoutBuilderTestMenuHooks::systemBreadcrumbAlter

Implements hook_system_breadcrumb_alter().

Attributes

#[Hook('system_breadcrumb_alter', order: new OrderBefore(modules: [ 'layout_builder', ]))]

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestMenuHooks.php, line 22

Class

LayoutBuilderTestMenuHooks
Menu hook implementations for layout_builder_test.

Namespace

Drupal\layout_builder_test\Hook

Code

public function systemBreadcrumbAlter(Breadcrumb &$breadcrumb, RouteMatchInterface $route_match, array $context) : void {
  $breadcrumb->addLink(Link::fromTextAndUrl('External link', Url::fromUri('http://www.example.com')));
}

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