template_preprocess_breadcrumb(&$variables)
Prepares variables for breadcrumb templates.
Default template: breadcrumb.html.twig.
array $variables: An associative array containing:
function template_preprocess_breadcrumb(&$variables) { $variables['breadcrumb'] = array(); /** @var \Drupal\Core\Link $link */ foreach ($variables['links'] as $key => $link) { $variables['breadcrumb'][$key] = array('text' => $link->getText(), 'url' => $link->getUrl()->toString()); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!theme.inc/function/template_preprocess_breadcrumb/8.1.x