function date_navigation_plugin_style::query in Date 6
Same name and namespace in other branches
- 6.2 includes/date_navigation_plugin_style.inc \date_navigation_plugin_style::query()
- 7 date_views/includes/date_navigation_plugin_style.inc \date_navigation_plugin_style::query()
File
- ./
date_api.views.inc, line 468 - Defines date-related Views data and plugins:
Class
- date_navigation_plugin_style
- Style plugin to create date back/next navigation.
Code
function query() {
include_once drupal_get_path('module', 'date_api') . '/date_api_sql.inc';
// Bring the argument information into the view so our theme can access it.
$i = 0;
foreach ($this->view->argument as $delta => $argument) {
if ($argument['id'] == 'date_argument') {
$this->view->date_type = $argument['handler']->date_type;
$this->view->date_arg = $argument['handler']->argument;
$this->view->date_arg_pos = $i;
$this->view->year = $argument['handler']->year;
$this->view->month = $argument['handler']->month;
$this->view->day = $argument['handler']->day;
$this->view->week = $argument['handler']->week;
$this->view->min_date = $argument['handler']->min_date;
$this->view->max_date = $argument['handler']->max_date;
}
$i++;
}
// bring the node type into the query so we can use it in the theme
$this->view->query
->add_field('node', 'type');
parent::query();
}