You are here

public function Condition::__construct in Search API 8

Constructs a Condition object.

Parameters

string $field: The field this condition checks.

mixed $value: The value being compared to the field.

string $operator: (optional) The operator that combined field and value in this condition.

File

src/Query/Condition.php, line 41

Class

Condition
Represents a single (field operator value) condition in a search query.

Namespace

Drupal\search_api\Query

Code

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