You are here

function workbench_access_handler_field_section::init in Workbench Access 7

Init the handler with necessary data.

Parameters

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

array $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

includes/workbench_access_handler_field_section.inc, line 13
Views integration for Workbench Access.

Class

workbench_access_handler_field_section
@file Views integration for Workbench Access.

Code

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