You are here

public function views_handler_field_taxonomy::construct in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/taxonomy/views_handler_field_taxonomy.inc \views_handler_field_taxonomy::construct()
  2. 6.2 modules/taxonomy/views_handler_field_taxonomy.inc \views_handler_field_taxonomy::construct()

Constructor to provide additional field to add.

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

Overrides views_handler_field::construct

File

modules/taxonomy/views_handler_field_taxonomy.inc, line 22
Definition of views_handler_field_taxonomy.

Class

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

Code

public function construct() {
  parent::construct();
  $this->additional_fields['vid'] = 'vid';
  $this->additional_fields['tid'] = 'tid';
  $this->additional_fields['name'] = 'name';
  $this->additional_fields['vocabulary_machine_name'] = array(
    'table' => 'taxonomy_vocabulary',
    'field' => 'machine_name',
  );
}