function EntityCondition::__construct

Same name in other branches
  1. 9 core/modules/jsonapi/src/Query/EntityCondition.php \Drupal\jsonapi\Query\EntityCondition::__construct()
  2. 10 core/modules/jsonapi/src/Query/EntityCondition.php \Drupal\jsonapi\Query\EntityCondition::__construct()
  3. 11.x core/modules/jsonapi/src/Query/EntityCondition.php \Drupal\jsonapi\Query\EntityCondition::__construct()

Constructs a new EntityCondition object.

File

core/modules/jsonapi/src/Query/EntityCondition.php, line 78

Class

EntityCondition
A condition object for the EntityQuery.

Namespace

Drupal\jsonapi\Query

Code

public function __construct($field, $value, $operator = NULL) {
    $this->field = $field;
    $this->value = $value;
    $this->operator = $operator ? $operator : '=';
}

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