You are here

public function BooleanOperator::query in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::query()

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides FilterPluginBase::query

2 methods override BooleanOperator::query()
BooleanOperatorString::query in core/modules/views/src/Plugin/views/filter/BooleanOperatorString.php
Add this filter to the query.
Current::query in core/modules/user/src/Plugin/views/filter/Current.php
Add this filter to the query.

File

core/modules/views/src/Plugin/views/filter/BooleanOperator.php, line 201
Contains \Drupal\views\Plugin\views\filter\BooleanOperator.

Class

BooleanOperator
Simple filter to handle matching of boolean values

Namespace

Drupal\views\Plugin\views\filter

Code

public function query() {
  $this
    ->ensureMyTable();
  $field = "{$this->tableAlias}.{$this->realField}";
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {
    call_user_func(array(
      $this,
      $info[$this->operator]['method'],
    ), $field);
  }
}