function InOperator::defineOptions

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

Overrides FilterPluginBase::defineOptions

1 call to InOperator::defineOptions()
ManyToOne::defineOptions in core/modules/views/src/Plugin/views/filter/ManyToOne.php
Information about options for all kinds of purposes will be held here.
1 method overrides InOperator::defineOptions()
ManyToOne::defineOptions in core/modules/views/src/Plugin/views/filter/ManyToOne.php
Information about options for all kinds of purposes will be held here.

File

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

Class

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

Namespace

Drupal\views\Plugin\views\filter

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    $options['operator']['default'] = 'in';
    $options['value']['default'] = [];
    $options['expose']['contains']['reduce'] = [
        'default' => FALSE,
    ];
    return $options;
}

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