You are here

function heartbeat_views_data in Heartbeat 6.2

Same name and namespace in other branches
  1. 8 heartbeat.views.inc \heartbeat_views_data()
  2. 6.4 views/heartbeat_views.views.inc \heartbeat_views_data()
  3. 6.3 views/heartbeat_views.views.inc \heartbeat_views_data()
  4. 7 heartbeat.views.inc \heartbeat_views_data()

Implementation of views hook hook_views_data()

Return value

unknown

File

user_activity_views/user_activity_views.views.inc, line 33

Code

function heartbeat_views_data() {
  $data = array(
    'user_activity' => array(
      'table' => array(
        'group' => t('User activity log table'),
        'base' => array(
          'field' => 'uaid',
          'title' => t('Activities'),
          'help' => t("User activities on the site"),
        ),
      ),
      'uid' => array(
        'title' => t('User'),
        'help' => t('The user who carried out the activity'),
        'relationship' => array(
          'base' => 'users',
          'field' => 'uid',
          'handler' => 'views_handler_relationship',
          'label' => t('User'),
        ),
      ),
      'uid_current' => array(
        'real field' => 'uid',
        'title' => t('Currently logged in user carried out the activity'),
        'help' => t('The user who did the activity is the currently logged in user'),
        'filter' => array(
          'handler' => 'views_handler_filter_user_current',
        ),
      ),
      'uid_requested' => array(
        'real field' => 'uid',
        'title' => t('Currently requested user (url argument) carried out the activity'),
        'help' => t('The user who did the activity is third argument in url heartbeat/user/% '),
        'argument' => array(
          'handler' => 'views_handler_argument_user_uid',
        ),
      ),
      'uid_target' => array(
        'title' => t('Target User'),
        'help' => t('The user who was the target of the activity (if present)'),
        'relationship' => array(
          'base' => 'users',
          'field' => 'uid',
          'handler' => 'views_handler_relationship',
          'label' => t('User'),
        ),
      ),
      'uid_tarted_current' => array(
        'real field' => 'uid_target',
        'title' => t('Currently logged in user is the activity\'s recipient'),
        'help' => t('The user who was the target of the activity is the currently logged in user'),
        'filter' => array(
          'handler' => 'views_handler_filter_user_current',
        ),
      ),
      'nid_target' => array(
        'title' => t('Target Node'),
        'help' => t('The node which was the target of the activity (if present)'),
        'relationship' => array(
          'base' => 'node',
          'field' => 'nid',
          'handler' => 'views_handler_relationship',
          'label' => t('Node'),
        ),
      ),
      'message' => array(
        'title' => t('Message'),
        'help' => t('Logged Message'),
        'field' => array(
          'handler' => 'views_handler_field_markup',
          'format' => FILTER_FORMAT_DEFAULT,
        ),
        'filter' => array(
          'handler' => 'views_handler_filter_string',
        ),
      ),
      // Language field
      'language' => array(
        'title' => t('Display language is current language(usertime)'),
        'help' => t('The language the content is in.'),
        'field' => array(
          'handler' => 'views_handler_field',
        ),
        'filter' => array(
          'handler' => 'views_handler_filter_user_activity_views_language',
        ),
      ),
      'timestamp' => array(
        'title' => t('Action\'s timestamp'),
        'help' => t('When the action happened'),
        'field' => array(
          'handler' => 'views_handler_field_date',
          'click sortable' => TRUE,
        ),
        'sort' => array(
          'handler' => 'views_handler_sort_date',
        ),
        'filter' => array(
          'handler' => 'views_handler_filter_date',
        ),
      ),
    ),
  );
  return $data;
}