function InOperator::opSimple
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/InOperator.php \Drupal\views\Plugin\views\filter\InOperator::opSimple()
- 8.9.x core/modules/views/src/Plugin/views/filter/InOperator.php \Drupal\views\Plugin\views\filter\InOperator::opSimple()
- 10 core/modules/views/src/Plugin/views/filter/InOperator.php \Drupal\views\Plugin\views\filter\InOperator::opSimple()
1 method overrides InOperator::opSimple()
- ModerationStateFilter::opSimple in core/
modules/ content_moderation/ src/ Plugin/ views/ filter/ ModerationStateFilter.php
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ InOperator.php, line 394
Class
- InOperator
- Simple filter to handle matching of multiple options selectable via checkboxes.
Namespace
Drupal\views\Plugin\views\filterCode
protected function opSimple() {
if (empty($this->value)) {
return;
}
$this->ensureMyTable();
// We use array_values() because the checkboxes keep keys and that can cause
// array addition problems.
$this->query
->addWhere($this->options['group'], "{$this->tableAlias}.{$this->realField}", array_values($this->value), $this->operator);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.