1.20.x date_views_argument_handler_simple.inc date_views_argument_handler_simple::summary_argument($data)

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

modules/date/views/date_views_argument_handler_simple.inc, line 289
Date API views argument handler.

Class

date_views_argument_handler_simple

Code

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);
}