function simplenews_views_tables in Simplenews 5
Implementation of hook_views_tables
File
- ./
simplenews_views.inc, line 11 - simplenews_views.inc Views support for simplenews
Code
function simplenews_views_tables() {
$tables['simplenews_newsletters'] = array(
'name' => 'simplenews_newsletters',
'fields' => array(
's_status' => array(
'name' => t('Simplenews: Sent status'),
'handler' => 'simplenews_handler_send_status',
'help' => t('Newsletter send status: Not sent, Pending (being sent or waiting for cron to run), Sent. '),
'sortable' => TRUE,
),
),
'join' => array(
'left' => array(
'table' => 'node',
'field' => 'nid',
),
'right' => array(
'field' => 'nid',
),
),
'sorts' => array(
's_status' => array(
'name' => t('Simplenews: Sent status'),
'help' => t('Sort by sent status; Ascending = Not sent > Pending > Sent'),
),
),
'filters' => array(
's_status' => array(
'name' => t('Simplenews: Sent status'),
'list' => 'simplenews_handler_filter_send_status',
'list-type' => 'list',
'operator' => 'views_handler_operator_or',
'value-type' => 'array',
'help' => t('Include or exclude status of the selected state.'),
),
),
);
return $tables;
}