Commit 0b5b1f13 authored by alexpott's avatar alexpott

Issue #2345801 by kgoel, tim.plunkett, dawehner, fgm, mr.baileys, Crell,...

Issue #2345801 by kgoel, tim.plunkett, dawehner, fgm, mr.baileys, Crell, Berdir: template_preprocess_breadcrumb() assumes all breadcrumbs are \Drupal\Core\Link objects
parent 65c2f39f
...@@ -428,7 +428,7 @@ function hook_contextual_links_plugins_alter(array &$contextual_links) { ...@@ -428,7 +428,7 @@ function hook_contextual_links_plugins_alter(array &$contextual_links) {
*/ */
function hook_system_breadcrumb_alter(\Drupal\Core\Breadcrumb\Breadcrumb &$breadcrumb, \Drupal\Core\Routing\RouteMatchInterface $route_match, array $context) { function hook_system_breadcrumb_alter(\Drupal\Core\Breadcrumb\Breadcrumb &$breadcrumb, \Drupal\Core\Routing\RouteMatchInterface $route_match, array $context) {
// Add an item to the end of the breadcrumb. // Add an item to the end of the breadcrumb.
$breadcrumb->addLink(Drupal::l(t('Text'), 'example_route_name')); $breadcrumb->addLink(\Drupal\Core\Link::createFromRoute(t('Text'), 'example_route_name'));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment