public function date_views_argument_handler_simple::summary_argument in Date 7.2
Same name and namespace in other branches
- 8 date_views/includes/date_views_argument_handler_simple.inc \date_views_argument_handler_simple::summary_argument()
- 7.3 date_views/includes/date_views_argument_handler_simple.inc \date_views_argument_handler_simple::summary_argument()
Provide the argument to use to link from the summary to the next level.
This will be called once per row of a summary, and used as part of $view->get_url().
Parameters
object $data: The query results for the row.
Overrides views_handler_argument::summary_argument
File
- date_views/
includes/ date_views_argument_handler_simple.inc, line 249 - Date API views argument handler.
Class
- date_views_argument_handler_simple
- Date API views argument handler.
Code
public function summary_argument($data) {
$format = $this->date_handler
->views_formats($this->options['granularity'], 'sql');
$value = $data->{$this->name_alias};
if (empty($value)) {
return $this->options['exception']['value'];
}
$range = $this->date_handler
->arg_range($value);
return date_format_date($range[0], 'custom', $format);
}