You are here

function views_handler_field_node_revision::init in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 modules/node/views_handler_field_node_revision.inc \views_handler_field_node_revision::init()
  2. 7.3 modules/node/views_handler_field_node_revision.inc \views_handler_field_node_revision::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/node/views_handler_field_node_revision.inc, line 8
Contains the basic 'node_revision' field handler.

Class

views_handler_field_node_revision
@file Contains the basic 'node_revision' field handler.

Code

function init(&$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['language'] = array(
        'table' => 'node',
        'field' => 'language',
      );
    }
  }
}