You are here

public function AnswersNewContentViewsHandler::construct in Answers 7.4

Construct a new field handler.

Overrides views_handler_field::construct

File

./answers_views_handler_new_content.inc, line 18
Definition of AnswersNewContentViewsHandler.

Class

AnswersNewContentViewsHandler
Field handler to display new content in question listing.

Code

public function construct() {
  parent::construct();
  global $user;
  if ($user->uid) {
    $this->additional_fields['nid'] = array(
      'table' => 'node',
      'field' => 'nid',
    );
    $this->additional_fields['created'] = array(
      'table' => 'node',
      'field' => 'created',
    );
  }
}