You are here

function PropertyBoolean::query in EntityFieldQuery Views Backend 8

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 BooleanOperator::query

File

src/Plugin/views/filter/PropertyBoolean.php, line 24
Contains \Drupal\efq_views\Plugin\views\filter\PropertyBoolean.

Class

PropertyBoolean
Filter handler for boolean properties.

Namespace

Drupal\efq_views\Plugin\views\filter

Code

function query() {
  if (empty($this->value)) {
    $this->query->query
      ->propertyCondition($this->real_field, 0, "=");
  }
  else {
    $this->query->query
      ->propertyCondition($this->real_field, 0, "<>");
  }
}