contextual_contextual_links_view_alter(&$element, $items)
Implements hook_contextual_links_view_alter().
See also
\Drupal\contextual\Plugin\views\field\ContextualLinks::render()
File
- core/modules/contextual/contextual.module, line 147
- Adds contextual links to perform actions related to elements on a page.
Code
function contextual_contextual_links_view_alter(&$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)); } }
Please login to continue.