class QueryAggregate
Same name in this branch
- 9 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate
Same name and namespace in other branches
- 11.x core/modules/workspaces/src/EntityQuery/QueryAggregate.php \Drupal\workspaces\EntityQuery\QueryAggregate
- 11.x core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate
Alters aggregate entity queries to use a workspace revision if possible.
Hierarchy
- class \Drupal\Core\Entity\Query\QueryBase extends \Drupal\Core\Entity\Query\QueryInterface
- class \Drupal\Core\Entity\Query\Sql\Query extends \Drupal\Core\Entity\Query\QueryInterface implements \Drupal\Core\Entity\Query\QueryBase
- class \Drupal\Core\Entity\Query\Sql\QueryAggregate extends \Drupal\Core\Entity\Query\QueryAggregateInterface implements \Drupal\Core\Entity\Query\Sql\Query
- class \Drupal\workspaces\EntityQuery\QueryAggregate uses \Drupal\workspaces\EntityQuery\QueryTrait implements \Drupal\Core\Entity\Query\Sql\QueryAggregate
- class \Drupal\Core\Entity\Query\Sql\QueryAggregate extends \Drupal\Core\Entity\Query\QueryAggregateInterface implements \Drupal\Core\Entity\Query\Sql\Query
- class \Drupal\Core\Entity\Query\Sql\Query extends \Drupal\Core\Entity\Query\QueryInterface implements \Drupal\Core\Entity\Query\QueryBase
Expanded class hierarchy of QueryAggregate
3 string references to 'QueryAggregate'
- PgsqlQueryFactory::getAggregate in core/
modules/ workspaces/ src/ EntityQuery/ PgsqlQueryFactory.php - QueryFactory::getAggregate in core/
modules/ workspaces/ src/ EntityQuery/ QueryFactory.php - QueryFactory::getAggregate in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ QueryFactory.php
File
-
core/
modules/ workspaces/ src/ EntityQuery/ QueryAggregate.php, line 10
Namespace
Drupal\workspaces\EntityQueryView source
class QueryAggregate extends BaseQueryAggregate {
use QueryTrait {
prepare as traitPrepare;
}
/**
* {@inheritdoc}
*/
public function prepare() {
// Aggregate entity queries do not return an array of entity IDs keyed by
// revision IDs, they only return the values of the aggregated fields, so we
// don't need to add any expressions like we do in
// \Drupal\workspaces\EntityQuery\Query::prepare().
$this->traitPrepare();
// Throw away the ID fields.
$this->sqlFields = [];
return $this;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.