You are here

function views_handler_field_term_node_tid::init in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 modules/taxonomy/views_handler_field_term_node_tid.inc \views_handler_field_term_node_tid::init()
  2. 7.3 modules/taxonomy/views_handler_field_term_node_tid.inc \views_handler_field_term_node_tid::init()

init the handler with necessary data.

Parameters

$view: The $view object this handler is attached to.

$options: The item from the database; the actual contents of this will vary based upon the type of handler.

Overrides views_handler_field::init

File

modules/taxonomy/views_handler_field_term_node_tid.inc, line 9

Class

views_handler_field_term_node_tid
Field handler to display all taxonomy terms of a node.

Code

function init(&$view, $options) {
  parent::init($view, $options);
  if ($view->base_table == 'node_revisions') {
    $this->additional_fields['vid'] = array(
      'table' => 'node_revisions',
      'field' => 'vid',
    );
  }
  else {
    $this->additional_fields['vid'] = array(
      'table' => 'node',
      'field' => 'vid',
    );
  }
}