You are here

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

Same name and namespace in other branches
  1. 7.3 modules/node/views_handler_field_node.inc \views_handler_field_node::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

2 calls to views_handler_field_node::init()
views_handler_field_history_user_timestamp::init in modules/node/views_handler_field_history_user_timestamp.inc
init the handler with necessary data.
views_handler_field_node_revision::init in modules/node/views_handler_field_node_revision.inc
init the handler with necessary data.
2 methods override views_handler_field_node::init()
views_handler_field_history_user_timestamp::init in modules/node/views_handler_field_history_user_timestamp.inc
init the handler with necessary data.
views_handler_field_node_revision::init in modules/node/views_handler_field_node_revision.inc
init the handler with necessary data.

File

modules/node/views_handler_field_node.inc, line 16
Contains the basic 'node' field handler.

Class

views_handler_field_node
Field handler to provide simple renderer that allows linking to a node. Definition terms:

Code

function init(&$view, $options) {
  parent::init($view, $options);

  // Don't add the additional fields to groupby
  if (!empty($this->options['link_to_node'])) {
    $this->additional_fields['nid'] = array(
      'table' => 'node',
      'field' => 'nid',
    );
    if (module_exists('translation')) {
      $this->additional_fields['language'] = array(
        'table' => 'node',
        'field' => 'language',
      );
    }
  }
}