W3cubDocs

/Drupal 8

protected function QueryBase::conditionGroupFactory

protected QueryBase::conditionGroupFactory($conjunction = 'AND')

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.

File

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

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Query!QueryBase.php/function/QueryBase::conditionGroupFactory/8.1.x