function InOperator::op_simple

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/InOperator.php, line 380
Definition of Drupal\views\Plugin\views\filter\InOperator.

Class

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

Namespace

Drupal\views\Plugin\views\filter

Code

function op_simple() {
  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
    ->add_where($this->options['group'], "{$this->tableAlias}.{$this->realField}", array_values($this->value), $this->operator);
}