function views_handler_field_node::init

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 22

Class

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

Code

public 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',
            );
        }
    }
}