You are here

function simplenews_scheduler_views_tables in Simplenews Scheduler 5

Same name and namespace in other branches
  1. 8 simplenews_scheduler_views.inc \simplenews_scheduler_views_tables()
  2. 6.2 simplenews_scheduler_views.inc \simplenews_scheduler_views_tables()
  3. 7 simplenews_scheduler_views.inc \simplenews_scheduler_views_tables()
  4. 2.0.x simplenews_scheduler_views.inc \simplenews_scheduler_views_tables()

Implementation of hook_views_tables

File

./simplenews_scheduler_views.inc, line 11
simplenews_scheduler_views.inc Views support for simplenews

Code

function simplenews_scheduler_views_tables() {
  $tables['simplenews_scheduler'] = array(
    'name' => 'simplenews_scheduler',
    'fields' => array(),
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid',
      ),
      'right' => array(
        'field' => 'snid',
      ),
    ),
    'sorts' => array(),
    'filters' => array(
      'last_run' => array(
        'name' => t('Simplenews schedule: node created'),
        'list' => 'simplenews_scheduler_handler_newsletters',
        'list-type' => 'list',
        'handler' => 'simplenews_scheduler_filter_value',
        'operator' => 'simplenews_scheduler_handler_operator_ca',
        'value-type' => 'array',
        'help' => t('Select the newsletter to filter against, this will filter nodes that have been created AFTER the latest <i>edition</i> of this newsletter'),
      ),
    ),
  );
  return $tables;
}