function BooleanOperator::operatorValues

Returns operators for values.

Parameters

int $values: The values filter value.

Return value

string[] A filtered list of operators.

2 calls to BooleanOperator::operatorValues()
BooleanOperator::adminSummary in core/modules/views/src/Plugin/views/filter/BooleanOperator.php
Display the filter on the administrative summary.
BooleanOperator::valueForm in core/modules/views/src/Plugin/views/filter/BooleanOperator.php
Options form subform for setting options.

File

core/modules/views/src/Plugin/views/filter/BooleanOperator.php, line 379

Class

BooleanOperator
Simple filter to handle matching of boolean values.

Namespace

Drupal\views\Plugin\views\filter

Code

protected function operatorValues(int $values = 1) : array {
    $options = [];
    foreach ($this->operators() as $id => $info) {
        if (isset($info['values']) && $info['values'] === $values) {
            $options[] = $id;
        }
    }
    return $options;
}

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