public function Numeric::adminSummary

Display the filter on the administrative summary

Overrides FilterPluginBase::adminSummary

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/Numeric.php, line 284
Definition of Drupal\views\Plugin\views\filter\Numeric.

Class

Numeric
Simple filter to handle greater than/less than filters

Namespace

Drupal\views\Plugin\views\filter

Code

public function adminSummary() {
  if ($this
    ->isAGroup()) {
    return t('grouped');
  }
  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;
}