public function NodeAddToAnyShare::render in AddToAny Share Buttons 8
inheritdoc}
Overrides FieldPluginBase::render
File
- src/
Plugin/ views/ field/ NodeAddToAnyShare.php, line 27
Class
- NodeAddToAnyShare
- Field handler to flag the node type.
Namespace
Drupal\addtoany\Plugin\views\fieldCode
public function render(ResultRow $values) {
$entity = $values->_entity;
if ($entity
->access('view')) {
$data = addtoany_create_entity_data($entity);
return [
'#addtoany_html' => \Drupal::token()
->replace($data['addtoany_html'], [
'node' => $entity,
]),
'#link_url' => $data['link_url'],
'#link_title' => $data['link_title'],
'#button_setting' => $data['button_setting'],
'#button_image' => $data['button_image'],
'#universal_button_placement' => $data['universal_button_placement'],
'#buttons_size' => $data['buttons_size'],
'#theme' => 'addtoany_standard',
];
}
}