function Node::init
Same name in other branches
- 9 core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node::init()
- 8.9.x core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node::init()
- 10 core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node::init()
Overrides FieldPluginBase::init
1 call to Node::init()
- HistoryUserTimestamp::init in core/
modules/ history/ src/ Plugin/ views/ field/ HistoryUserTimestamp.php
1 method overrides Node::init()
- HistoryUserTimestamp::init in core/
modules/ history/ src/ Plugin/ views/ field/ HistoryUserTimestamp.php
File
-
core/
modules/ node/ src/ Plugin/ views/ field/ Node.php, line 28
Class
- Node
- Field handler to provide simple renderer that allows linking to a node.
Namespace
Drupal\node\Plugin\views\fieldCode
public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
parent::init($view, $display, $options);
// Don't add the additional fields to groupby
if (!empty($this->options['link_to_node'])) {
$this->additional_fields['nid'] = [
'table' => 'node_field_data',
'field' => 'nid',
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.