commons_follow.views.inc in Drupal Commons 7.3
File
modules/commons/commons_follow/includes/views/commons_follow.views.inc
View source
<?php
function commons_follow_views_plugins() {
return array(
'argument default' => array(
'commons_follow_node' => array(
'title' => t('The node IDs the user is subscribed to'),
'handler' => 'commons_follow_plugin_argument_default_node',
),
'commons_follow_message' => array(
'title' => t('The message IDs the user is subscribed to'),
'handler' => 'commons_follow_plugin_argument_default_message',
),
),
);
}
function commons_follow_views_data() {
$data['node']['cf_user_follow'] = array(
'title' => t('User Follow'),
'help' => t('Whether the user is following this content.'),
'real field' => 'nid',
'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'),
'help' => t('Whether the user is following items related to this message.'),
'real field' => 'mid',
'filter' => array(
'handler' => 'commons_follow_user_follow_filter_message',
'label' => t('Following'),
'type' => 'yes-no',
),
);
return $data;
}