You are here

protected function QueryBase::conditionGroupFactory in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::conditionGroupFactory()
  2. 9 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::conditionGroupFactory()

Creates an object holding a group of conditions.

See andConditionGroup() and orConditionGroup() for more.

Parameters

string $conjunction:

  • AND (default): this is the equivalent of andConditionGroup().
  • OR: this is the equivalent of orConditionGroup().

Return value

\Drupal\Core\Entity\Query\ConditionInterface An object holding a group of conditions.

3 calls to QueryBase::conditionGroupFactory()
QueryBase::andConditionGroup in core/lib/Drupal/Core/Entity/Query/QueryBase.php
Creates a new group of conditions ANDed together.
QueryBase::orConditionGroup in core/lib/Drupal/Core/Entity/Query/QueryBase.php
Creates a new group of conditions ORed together.
QueryBase::__construct in core/lib/Drupal/Core/Entity/Query/QueryBase.php
Constructs this object.

File

core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 210

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

protected function conditionGroupFactory($conjunction = 'AND') {
  $class = static::getClass($this->namespaces, 'Condition');
  return new $class($conjunction, $this, $this->namespaces);
}