1 views_handler_field_node.inc views_handler_field_node::init(&$view, &$options)

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

core/modules/node/views/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['langcode'] = array('table' => 'node', 'field' => 'langcode');
    }
  }
}