function recently_read_views_data in Recently Read 7.3
Same name and namespace in other branches
- 7.2 includes/recently_read.views.inc \recently_read_views_data()
Implements of hook_views_data().
File
- includes/
recently_read.views.inc, line 15
Code
function recently_read_views_data() {
$data['recently_read']['table']['group'] = t('Recently Read');
$data['recently_read']['sid'] = array(
'title' => t('Recently read Session api sid'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'relationship' => array(
'base' => 'session_api',
'base field' => 'sid',
'handler' => 'views_handler_relationship',
'label' => t('Label for sid'),
'title' => t('Session api'),
'help' => t('Relationship to session api'),
),
);
$data['recently_read']['type'] = array(
'title' => t('entity type'),
'help' => t('Entity Type'),
'filter' => array(
'handler' => 'recently_read_handler_filter_entity_type',
),
);
$data['recently_read']['entity_id'] = array(
'title' => t('Recently Read Entity Id'),
'help' => t('Recently Read Entity Id'),
'field' => array(
'handler' => 'views_handler_field_numeric',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_user_name',
),
);
$data['recently_read']['current'] = array(
'real field' => 'sid',
'title' => t('Current'),
'help' => t('Filter the view to the current user.'),
'filter' => array(
'handler' => 'recently_read_handler_filter_current',
'type' => 'yes-no',
),
);
$data['recently_read']['timestamp'] = array(
'title' => t('Recently Read Date'),
'help' => t('Recently Read Time'),
'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;
}