class QueryAggregate in Drupal 10
Same name in this branch
- 10 core/modules/workspaces/src/EntityQuery/QueryAggregate.php \Drupal\workspaces\EntityQuery\QueryAggregate
- 10 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate
Same name and namespace in other branches
- 8 core/modules/workspaces/src/EntityQuery/QueryAggregate.php \Drupal\workspaces\EntityQuery\QueryAggregate
- 9 core/modules/workspaces/src/EntityQuery/QueryAggregate.php \Drupal\workspaces\EntityQuery\QueryAggregate
Alters aggregate entity queries to use a workspace revision if possible.
Hierarchy
- class \Drupal\workspaces\EntityQuery\QueryAggregate extends \Drupal\Core\Entity\Query\Sql\QueryAggregate uses QueryTrait
Expanded class hierarchy of QueryAggregate
3 string references to 'QueryAggregate'
- PgsqlQueryFactory::getAggregate in core/
modules/ workspaces/ src/ EntityQuery/ PgsqlQueryFactory.php - Instantiates an aggregation query object for a given entity type.
- QueryFactory::getAggregate in core/
modules/ workspaces/ src/ EntityQuery/ QueryFactory.php - Instantiates an aggregation query object for a given entity type.
- QueryFactory::getAggregate in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ QueryFactory.php - Instantiates an aggregation query object for a given entity type.
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QueryAggregate:: |
public | function | ||
QueryTrait:: |
protected | property | The workspace manager. | |
QueryTrait:: |
public | function | ||
QueryTrait:: |
public | function | Aliased as: traitPrepare | |
QueryTrait:: |
public | function | Constructs a Query object. |