You are here

function timefield_handler_filter_timefield_duration::admin_summary in Timefield 7

Display the filter on the administrative summary.

Overrides views_handler_filter_numeric::admin_summary

File

views/timefield_handler_filter_timefield_duration.inc, line 97
Contains the duration filter handler.

Class

timefield_handler_filter_timefield_duration
@file Contains the duration filter handler.

Code

function admin_summary() {
  if (!empty($this->options['exposed'])) {
    return t('exposed');
  }
  $options = $this
    ->operator_options('short');
  $output = check_plain($options[$this->operator]);
  if (in_array($this->operator, $this
    ->operator_values(2))) {
    $output .= ' ' . t('@min and @max', array(
      '@min' => $this->value['min'],
      '@max' => $this->value['max'],
    ));
  }
  elseif (in_array($this->operator, $this
    ->operator_values(1))) {
    $output .= ' ' . check_plain($this->value['value']);
  }
  return $output . ' ' . ucfirst($this->duration_unit);
}