You are here

protected function ConfigEntityQuery::buildSorting in Configuration Views 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/views/query/ConfigEntityQuery.php \Drupal\config_views\Plugin\views\query\ConfigEntityQuery::buildSorting()

Adds sorting to query.

Parameters

\Drupal\Core\Entity\Query\QueryInterface $query: The query to get configs.

1 call to ConfigEntityQuery::buildSorting()
ConfigEntityQuery::execute in src/Plugin/views/query/ConfigEntityQuery.php
Executes query and fills the associated view object with according values.

File

src/Plugin/views/query/ConfigEntityQuery.php, line 166

Class

ConfigEntityQuery
This query is able to work with config entities.

Namespace

Drupal\config_views\Plugin\views\query

Code

protected function buildSorting(QueryInterface $query) {
  foreach ($this->sorting as $field => $direction) {
    $query
      ->sort($field, $direction);
  }
}