ConditionInterface
interface ConditionInterface (View source)
Defines the entity query condition interface.
Methods
Gets the current conjunction.
Implements \Countable::count().
Adds a condition.
Queries for the existence of a field.
Queries for the nonexistence of a field.
Gets a complete list of all conditions in this conditional clause.
Compiles this conditional clause.
Details
string
getConjunction()
Gets the current conjunction.
count()
Implements \Countable::count().
Returns the size of this conditional. The size of the conditional is the size of its conditional array.
$this
condition(string|ConditionInterface $field, mixed $value = NULL, string $operator = NULL, string $langcode = NULL)
Adds a condition.
$this
exists(string $field, string $langcode = NULL)
Queries for the existence of a field.
$this
notExists(string $field, string $langcode = NULL)
Queries for the nonexistence of a field.
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.
compile($query)
Compiles this conditional clause.