LayoutBuilderTestMenuHooks.php
Namespace
Drupal\layout_builder_test\HookFile
-
core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Hook/ LayoutBuilderTestMenuHooks.php
View source
<?php
declare (strict_types=1);
namespace Drupal\layout_builder_test\Hook;
use Drupal\Core\Url;
use Drupal\Core\Link;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Breadcrumb\Breadcrumb;
use Drupal\Core\Hook\Attribute\Hook;
use Drupal\Core\Hook\Order\OrderBefore;
/**
* Menu hook implementations for layout_builder_test.
*/
class LayoutBuilderTestMenuHooks {
/**
* Implements hook_system_breadcrumb_alter().
*/
public function systemBreadcrumbAlter(Breadcrumb &$breadcrumb, RouteMatchInterface $route_match, array $context) : void {
$breadcrumb->addLink(Link::fromTextAndUrl('External link', Url::fromUri('http://www.example.com')));
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
LayoutBuilderTestMenuHooks | Menu hook implementations for layout_builder_test. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.