function InOperator::init

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

Overrides \Drupal\views\Plugin\views\HandlerBase::init().

Provide some extra help to get the operator/value easier to use.

This likely has to be overridden by filters which are more complex than simple operator/value.

Overrides FilterPluginBase::init

2 calls to InOperator::init()
Bundle::init in core/modules/views/src/Plugin/views/filter/Bundle.php
Overrides \Drupal\views\Plugin\views\HandlerBase::init().
ManyToOne::init in core/modules/views/src/Plugin/views/filter/ManyToOne.php
Overrides \Drupal\views\Plugin\views\HandlerBase::init().
2 methods override InOperator::init()
Bundle::init in core/modules/views/src/Plugin/views/filter/Bundle.php
Overrides \Drupal\views\Plugin\views\HandlerBase::init().
ManyToOne::init in core/modules/views/src/Plugin/views/filter/ManyToOne.php
Overrides \Drupal\views\Plugin\views\HandlerBase::init().

File

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

Class

InOperator
Filter to handle matching of multiple options selectable via checkboxes.

Namespace

Drupal\views\Plugin\views\filter

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
  parent::init($view, $display, $options);
  $this->valueTitle = $this->t('Options');
  $this->valueOptions = NULL;
}

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