Condition
class Condition extends Condition (View source)
Defines the condition class for the key value entity query.
Properties
| protected array | $conditions | Array of conditions. |
from ConditionFundamentals |
| protected string | $conjunction | The conjunction of this condition group. |
from ConditionFundamentals |
| protected QueryInterface | $query | The query this condition belongs to. |
from ConditionFundamentals |
| protected array | $namespaces | List of potential namespaces of the classes belonging to this condition. |
from ConditionFundamentals |
Methods
Constructs a Condition object.
Adds a condition.
Queries for the existence of a field.
Queries for the nonexistence of a field.
Matches for an array representing one or more config paths.
Details
__construct(string $conjunction, QueryInterface $query, array $namespaces = [])
Constructs a Condition object.
getConjunction()
{@inheritdoc}
count()
{@inheritdoc}
conditions()
{@inheritdoc}
__clone()
Implements the magic __clone function.
Makes sure condition groups are cloned as well.
$this
condition(string|ConditionInterface $field, mixed $value = NULL, string $operator = NULL, string $langcode = NULL)
Adds a condition.
compile($configs)
Compiles this conditional clause.
$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.
protected bool
matchArray(array $condition, array $data, array $needs_matching, array $parents = [])
Matches for an array representing one or more config paths.
protected bool
match(array $condition, string $value)
Perform the actual matching.