public function QueryBase::sort

Implements \Drupal\Core\Entity\Query\QueryInterface::sort().

1 call to QueryBase::sort()
QueryBase::tableSort in drupal/core/lib/Drupal/Core/Entity/Query/QueryBase.php
Implements \Drupal\Core\Entity\Query\QueryInterface::tableSort().

File

drupal/core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 190
Contains \Drupal\Core\Entity\Query\QueryBase.

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

public function sort($field, $direction = 'ASC', $langcode = NULL) {
  $this->sort[] = array(
    'field' => $field,
    'direction' => $direction,
    'langcode' => $langcode,
  );
  return $this;
}