public function Taxonomy::init

Overrides Drupal\views\Plugin\views\field\FieldPluginBase::init().

This method assumes the taxonomy_term_data table. If using another table, we'll need to be more specific.

Overrides FieldPluginBase::init

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php, line 33
Definition of Drupal\taxonomy\Plugin\views\field\Taxonomy.

Class

Taxonomy
Field handler to provide simple renderer that allows linking to a taxonomy term.

Namespace

Drupal\taxonomy\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
  parent::init($view, $display, $options);
  $this->additional_fields['vid'] = 'vid';
  $this->additional_fields['tid'] = 'tid';
}