Skip to content
Snippets Groups Projects
Commit 1511ac7c authored by Florent Torregrosa's avatar Florent Torregrosa
Browse files

Issue #3494794 by grimreaper, pdureau: LinksPropType normalization: handle in_active_trail

parent 5bf45986
Branches
Tags
1 merge request!304Issue #3494794 by grimreaper: LinksPropType normalization: handle in_active_trail
Pipeline #372746 passed
......@@ -212,8 +212,13 @@ class LinksPropType extends PropTypePluginBase implements ContainerFactoryPlugin
$options = $url->getOptions();
self::setHrefLang($options);
self::setActiveClass($options, $url);
if (isset($item['in_active_trail'])) {
$options['attributes']['data-drupal-active-trail'] = $item['in_active_trail'] ? 'true' : 'false';
}
if (isset($options["attributes"])) {
$item = self:: mergeUrlAttributes($options["attributes"], $item);
$item = self::mergeUrlAttributes($options["attributes"], $item);
}
return $item;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment