function InOperator::operatorOptions

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

Build strings from the operators() for 'select' options.

Overrides FilterPluginBase::operatorOptions

1 method overrides InOperator::operatorOptions()
TaxonomyIndexTidDepth::operatorOptions in core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php
Build strings from the operators() for 'select' options.

File

core/modules/views/src/Plugin/views/filter/InOperator.php, line 153

Class

InOperator
Simple filter to handle matching of multiple options selectable via checkboxes.

Namespace

Drupal\views\Plugin\views\filter

Code

public function operatorOptions($which = 'title') {
    $options = [];
    foreach ($this->operators() as $id => $info) {
        $options[$id] = $info[$which];
    }
    return $options;
}

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