You are here

public function QueryAggregate::prepare in Drupal 9

Same name in this branch
  1. 9 core/modules/workspaces/src/EntityQuery/QueryAggregate.php \Drupal\workspaces\EntityQuery\QueryAggregate::prepare()
  2. 9 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::prepare()
Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::prepare()
  2. 10 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::prepare()

Prepares the basic query with proper metadata/tags and base fields.

Return value

$this Returns the called object.

Throws

\Drupal\Core\Entity\Query\QueryException Thrown if the base table does not exist.

Overrides Query::prepare

1 method overrides QueryAggregate::prepare()
QueryAggregate::prepare in core/modules/workspaces/src/EntityQuery/QueryAggregate.php
Prepares the basic query with proper metadata/tags and base fields.

File

core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 39

Class

QueryAggregate
The SQL storage entity query aggregate class.

Namespace

Drupal\Core\Entity\Query\Sql

Code

public function prepare() {
  parent::prepare();

  // Throw away the id fields.
  $this->sqlFields = [];
  return $this;
}