function NumericFilter::adminSummary

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/filter/NumericFilter.php \Drupal\views\Plugin\views\filter\NumericFilter::adminSummary()
  2. 8.9.x core/modules/views/src/Plugin/views/filter/NumericFilter.php \Drupal\views\Plugin\views\filter\NumericFilter::adminSummary()
  3. 11.x core/modules/views/src/Plugin/views/filter/NumericFilter.php \Drupal\views\Plugin\views\filter\NumericFilter::adminSummary()

Overrides FilterPluginBase::adminSummary

File

core/modules/views/src/Plugin/views/filter/NumericFilter.php, line 399

Class

NumericFilter
Simple filter to handle greater than/less than filters.

Namespace

Drupal\views\Plugin\views\filter

Code

public function adminSummary() {
    if ($this->isAGroup()) {
        return $this->t('grouped');
    }
    if (!empty($this->options['exposed'])) {
        return $this->t('exposed');
    }
    $options = $this->operatorOptions('short');
    $output = $options[$this->operator];
    if (in_array($this->operator, $this->operatorValues(2))) {
        $output .= ' ' . $this->t('@min and @max', [
            '@min' => $this->value['min'],
            '@max' => $this->value['max'],
        ]);
    }
    elseif (in_array($this->operator, $this->operatorValues(1))) {
        $output .= ' ' . $this->value['value'];
    }
    return $output;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.