protected function QueryAggregate::addSortAggregate

Builds the aggregation sort part of the query.

Return value

\Drupal\field_sql_storage\Entity\QueryAggregate Returns the called object.

File

drupal/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/QueryAggregate.php, line 124
Contains \Drupal\field_sql_storage\Entity\QueryAggregate.

Class

QueryAggregate
The SQL storage entity query aggregate class.

Namespace

Drupal\field_sql_storage\Entity

Code

protected function addSortAggregate() {
  if (!$this->count) {
    foreach ($this->sortAggregate as $alias => $sort) {
      $this->sqlQuery
        ->orderBy($this->sqlExpressions[$alias], $sort['direction']);
    }
  }
  return $this;
}