function ConditionFundamentals::setQuery

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php \Drupal\Core\Entity\Query\ConditionFundamentals::setQuery()

File

core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php, line 95

Class

ConditionFundamentals
Common code for all implementations of the entity query condition interfaces.

Namespace

Drupal\Core\Entity\Query

Code

public function setQuery(QueryInterface $query) : static {
  $this->query = $query;
  foreach ($this->conditions as $condition) {
    if ($condition['field'] instanceof ConditionInterface) {
      $condition['field']->setQuery($query);
    }
  }
  return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.