public function BooleanOperator::adminSummary

Display the filter on the administrative summary

Overrides FilterPluginBase::adminSummary

File

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

Class

BooleanOperator
Simple filter to handle matching of boolean values

Namespace

Drupal\views\Plugin\views\filter

Code

public function adminSummary() {
  if ($this
    ->isAGroup()) {
    return t('grouped');
  }
  if (!empty($this->options['exposed'])) {
    return t('exposed');
  }
  if (empty($this->value_options)) {
    $this
      ->getValueOptions();
  }

  // Now that we have the valid options for this filter, just return the
  // human-readable label based on the current value.  The value_options
  // array is keyed with either 0 or 1, so if the current value is not
  // empty, use the label for 1, and if it's empty, use the label for 0.
  return $this->value_options[!empty($this->value)];
}