conjunction = $conjunction; $this->query = $query; } /** * Implements \Drupal\Core\Entity\Query\ConditionInterface::getConjunction(). */ public function getConjunction() { return $this->conjunction; } /** * Implements \Countable::count(). */ public function count() { return count($this->conditions) - 1; } /** * Implements \Drupal\Core\Entity\Query\ConditionInterface::conditions(). */ public function &conditions() { return $this->conditions; } /** * Implements the magic __clone function. * * Makes sure condition groups are cloned as well. */ public function __clone() { foreach ($this->conditions as $key => $condition) { if ($condition['field'] instanceOf ConditionInterface) { $this->conditions[$key]['field'] = clone($condition['field']); } } } }