public function Node::init

Overrides Drupal\views\Plugin\views\HandlerBase::init().

Overrides FieldPluginBase::init

2 calls to Node::init()
HistoryUserTimestamp::init in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/HistoryUserTimestamp.php
Overrides Drupal\views\Plugin\views\HandlerBase::init().
Revision::init in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Revision.php
Overrides Drupal\views\Plugin\views\HandlerBase::init().
2 methods override Node::init()
HistoryUserTimestamp::init in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/HistoryUserTimestamp.php
Overrides Drupal\views\Plugin\views\HandlerBase::init().
Revision::init in drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Revision.php
Overrides Drupal\views\Plugin\views\HandlerBase::init().

File

drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Node.php, line 28
Definition of Drupal\node\Plugin\views\field\Node.

Class

Node
Field handler to provide simple renderer that allows linking to a node. Definition terms:

Namespace

Drupal\node\Plugin\views\field

Code

public function init(ViewExecutable $view, &$options) {
  parent::init($view, $options);

  // Don't add the additional fields to groupby
  if (!empty($this->options['link_to_node'])) {
    $this->additional_fields['nid'] = array(
      'table' => 'node',
      'field' => 'nid',
    );
    if (module_exists('translation')) {
      $this->additional_fields['langcode'] = array(
        'table' => 'node',
        'field' => 'langcode',
      );
    }
  }
}