You are here

function date_api_views_plugins in Date 6

Same name and namespace in other branches
  1. 6.2 includes/date_api.views.inc \date_api_views_plugins()

Implementation of hook_views_plugins

File

./date_api.views.inc, line 56
Defines date-related Views data and plugins:

Code

function date_api_views_plugins() {
  $path = drupal_get_path('module', 'date_api');
  $base = array(
    'file' => 'theme.inc',
    'path' => "{$path}/theme",
  );
  return array(
    'module' => 'date_api',
    // This just tells our themes are elsewhere.
    'display' => array(
      // Display plugin for date navigation.
      'date_nav' => $base + array(
        'title' => t('Date browser'),
        'help' => t('Date back/next navigation to attach to other displays. Requires the Date argument.'),
        'handler' => 'date_plugin_display_attachment',
        'theme' => 'views_view',
        'use ajax' => TRUE,
        'admin' => t('Date browser'),
        'help topic' => 'display-date_navigation',
      ),
    ),
    'style' => array(
      // Style plugin for the navigation display.
      'date_nav' => $base + array(
        'title' => t('Date browser style'),
        'help' => t('Creates back/next navigation.'),
        'handler' => 'date_navigation_plugin_style',
        'theme' => 'date_navigation',
        'uses row plugin' => FALSE,
        'uses fields' => FALSE,
        'uses options' => TRUE,
        'type' => 'date_nav',
        'even empty' => TRUE,
      ),
    ),
    // Add an option to set a default value for an empty date argument.
    'argument default' => array(
      'date' => $base + array(
        'title' => t('Current date'),
        'handler' => 'date_plugin_argument_default',
      ),
    ),
  );
}