You are here

function answers_views_data in Answers 7.4

Implements hook_views_data().

File

./answers.module, line 532
The Answers module.

Code

function answers_views_data() {
  $data['views']['answers_count'] = array(
    'title' => t('!Answers Count', answers_translation()),
    'help' => t('Shows the number of answers to a question.'),
    'area' => array(
      'handler' => 'AnswersCountViewsHandler',
    ),
  );
  $data['answers']['table']['group'] = t('!Answers', answers_translation());
  $data['answers']['table']['join'] = array(
    '#global' => array(),
  );
  $data['answers']['new_answers'] = array(
    'title' => t('Has new content'),
    'field' => array(
      'handler' => 'AnswersNewContentViewsHandler',
      'help' => t('Show a marker if the !question is new or has new !answers since last access.', answers_translation()),
    ),
  );
  $data['answers']['new_answers_since_last_login'] = array(
    'title' => t('Has new content since last login'),
    'field' => array(
      'handler' => 'AnswersNewContentSinceLastLoginViewsHandler',
      'help' => t('Show a marker if the !question is new or has new !answers since last login.', answers_translation()),
    ),
  );
  return $data;
}