You are here

function _datex_date_views_argument_handler_simple::summary_name in Datex 7.3

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

Overrides views_handler_argument::summary_name

File

./datex.views.inc, line 737
Datex views integration.

Class

_datex_date_views_argument_handler_simple
Copied from date_views module. So we have no hard dependency on it.

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 date_format_date($range[0], 'custom', $format);
}