function QueryAggregate::addSortAggregate
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::addSortAggregate()
- 10 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::addSortAggregate()
- 11.x core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::addSortAggregate()
Builds the aggregation sort part of the query.
Return value
$this Returns the called object.
File
-
core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ QueryAggregate.php, line 120
Class
- QueryAggregate
- The SQL storage entity query aggregate class.
Namespace
Drupal\Core\Entity\Query\SqlCode
protected function addSortAggregate() {
if (!$this->count) {
foreach ($this->sortAggregate as $alias => $sort) {
$this->sqlQuery
->orderBy($alias, $sort['direction']);
}
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.