function ContextualHooks::contextualLinksViewAlter
Implements hook_contextual_links_view_alter().
See also
\Drupal\contextual\Plugin\views\field\ContextualLinks::render()
File
-
core/
modules/ contextual/ src/ Hook/ ContextualHooks.php, line 112
Class
- ContextualHooks
- Hook implementations for contextual.
Namespace
Drupal\contextual\HookCode
public function contextualLinksViewAlter(&$element, $items) {
if (isset($element['#contextual_links']['contextual'])) {
$encoded_links = $element['#contextual_links']['contextual']['metadata']['contextual-views-field-links'];
$element['#links'] = Json::decode(rawurldecode($encoded_links));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.