'contextual' =>
[ '',
[],
[ 'contextual-views-field-links' => UrlHelper::
encodePath(Json::
encode($links)),
],
],
];
$element =
[ '#type' => 'contextual_links_placeholder',
'#id' =>
_contextual_links_to_id($contextual_links),
];
return \Drupal::
service('renderer'
)->
render($element);
} else { return '';
} } /**
* {@inheritdoc}
*/