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

Merge branch '3494794-linksproptype-normalization-handle' into '2.0.x'

Issue #3494794 by grimreaper: LinksPropType normalization: handle in_active_trail

See merge request !304
parents 5bf45986 c28ae6f2
No related branches found
No related tags found
No related merge requests found
Pipeline #372691 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