interface ConditionAggregateInterface implements Countable (View source)

Defines aggregated entity query conditions.

Methods

string
getConjunction()

Gets the current conjunction.

$this
condition(string|ConditionAggregateInterface $field, string $function = NULL, mixed $value = NULL, string $operator = NULL, string $langcode = NULL)

Adds a condition.

exists($field, $function, string $langcode = NULL)

Queries for the existence of a field.

notExists(string $field, $function, $langcode = NULL)

Queries for the nonexistence of a field.

array
conditions()

Gets a complete list of all conditions in this conditional clause.

compile($query)

Compiles this conditional clause.

Details

string getConjunction()

Gets the current conjunction.

Return Value

string

Can be AND or OR.

$this condition(string|ConditionAggregateInterface $field, string $function = NULL, mixed $value = NULL, string $operator = NULL, string $langcode = NULL)

Adds a condition.

Parameters

string|ConditionAggregateInterface $field
string $function
mixed $value
string $operator
string $langcode

Return Value

$this

The called object.

See also

QueryInterface::condition

ConditionInterface exists($field, $function, string $langcode = NULL)

Queries for the existence of a field.

Parameters

$field
$function
string $langcode

Return Value

ConditionInterface

See also

QueryInterface::exists

ConditionInterface notExists(string $field, $function, $langcode = NULL)

Queries for the nonexistence of a field.

Parameters

string $field
$function
$langcode

Return Value

ConditionInterface

See also

QueryInterface::notExists

array conditions()

Gets a complete list of all conditions in this conditional clause.

This method returns by reference. That allows alter hooks to access the data structure directly and manipulate it before it gets compiled.

Return Value

array

compile($query)

Compiles this conditional clause.

Parameters

$query

The query object this conditional clause belongs to.