You are here

function commons_follow_views_data in Drupal Commons 7.3

Implements hook_views_data().

File

modules/commons/commons_follow/includes/views/commons_follow.views.inc, line 26

Code

function commons_follow_views_data() {
  $data['node']['cf_user_follow'] = array(
    'title' => t('User Follow'),
    // The item it appears as on the UI,
    'help' => t('Whether the user is following this content.'),
    // The help that appears on the UI,
    'real field' => 'nid',
    // Information for displaying a title as a field
    'filter' => array(
      'handler' => 'commons_follow_user_follow_filter',
      'label' => t('Following'),
      'type' => 'yes-no',
    ),
  );
  $data['message']['cf_user_follow_message'] = array(
    'title' => t('User Follow'),
    // The item it appears as on the UI,
    'help' => t('Whether the user is following items related to this message.'),
    // The help that appears on the UI,
    'real field' => 'mid',
    // Information for displaying a title as a field
    'filter' => array(
      'handler' => 'commons_follow_user_follow_filter_message',
      'label' => t('Following'),
      'type' => 'yes-no',
    ),
  );
  return $data;
}