public function Revision::init in Views (for Drupal 7) 8.3
Overrides Drupal\views\Plugin\views\HandlerBase::init().
Overrides Node::init
File
- lib/
Views/ node/ Plugin/ views/ field/ Revision.php, line 26 - Definition of Views\node\Plugin\views\field\Revision.
Class
- Revision
- A basic node_revision handler.
Namespace
Views\node\Plugin\views\fieldCode
public function init(ViewExecutable $view, &$options) {
parent::init($view, $options);
if (!empty($this->options['link_to_node_revision'])) {
$this->additional_fields['vid'] = 'vid';
$this->additional_fields['nid'] = 'nid';
if (module_exists('translation')) {
$this->additional_fields['langcode'] = array(
'table' => 'node',
'field' => 'langcode',
);
}
}
}