1 views_handler_field_history_user_timestamp.inc views_handler_field_history_user_timestamp::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_node::init

File

core/modules/node/views/views_handler_field_history_user_timestamp.inc, line 17
Definition of views_handler_field_history_user_timestamp.

Class

views_handler_field_history_user_timestamp
Field handler to display the marker for new content.

Code

function init(&$view, &$options) {
  parent::init($view, $options);
  global $user;
  if ($user->uid) {
    $this->additional_fields['created'] = array('table' => 'node', 'field' => 'created');
    $this->additional_fields['changed'] = array('table' => 'node', 'field' => 'changed');
    if (module_exists('comment') && !empty($this->options['comments'])) {
      $this->additional_fields['last_comment'] = array('table' => 'node_comment_statistics', 'field' => 'last_comment_timestamp');
    }
  }
}