function BooleanOperator::adminSummary
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::adminSummary()
- 10 core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::adminSummary()
- 11.x core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::adminSummary()
Overrides FilterPluginBase::adminSummary
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ BooleanOperator.php, line 195
Class
- BooleanOperator
- Simple filter to handle matching of boolean values.
Namespace
Drupal\views\Plugin\views\filterCode
public function adminSummary() {
if ($this->isAGroup()) {
return $this->t('grouped');
}
if (!empty($this->options['exposed'])) {
return $this->t('exposed');
}
if (empty($this->valueOptions)) {
$this->getValueOptions();
}
// Now that we have the valid options for this filter, just return the
// human-readable label based on the current value. The valueOptions
// 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->operator . ' ' . $this->valueOptions[!empty($this->value)];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.