You are here

function date_views_argument_handler_simple::summary_name in Date 8

Same name and namespace in other branches
  1. 7.3 date_views/includes/date_views_argument_handler_simple.inc \date_views_argument_handler_simple::summary_name()
  2. 7.2 date_views/includes/date_views_argument_handler_simple.inc \date_views_argument_handler_simple::summary_name()

Provide a link to the next level of the view from the summary.

File

date_views/includes/date_views_argument_handler_simple.inc, line 195
Date API views argument handler.

Class

date_views_argument_handler_simple
Date API argument handler.

Code

function summary_name($data) {
  $value = $data->{$this->name_alias};
  if (empty($value) && !empty($this->definition['empty field name'])) {
    return $this->definition['empty field name'];
  }
  elseif (empty($value)) {
    return $this->options['wildcard_substitution'];
  }
  $format = !empty($this->options['title_format_custom']) && !empty($this->options['title_format_custom']) ? $this->options['title_format_custom'] : $this->date_handler
    ->views_formats($this->options['granularity'], 'display');
  $range = $this->date_handler
    ->arg_range($value);
  return range[0]
    ->format($format);
}