You are here

protected function QueryBase::conditionGroupFactory in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 208
Contains \Drupal\Core\Entity\Query\QueryBase.

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);
}