You are here

public function SearchApiQuery::getSort in Search API 8

Retrieves the sorts set for this query.

Return value

array An array specifying the sort order for this query. Array keys are the field names in order of importance, the values are the respective order in which to sort the results according to the field.

See also

sort()

\Drupal\search_api\Query\QueryInterface::getSorts()

File

src/Plugin/views/query/SearchApiQuery.php, line 1419

Class

SearchApiQuery
Defines a Views query class for searching on Search API indexes.

Namespace

Drupal\search_api\Plugin\views\query

Code

public function &getSort() {
  if (!$this
    ->shouldAbort()) {
    return $this->query
      ->getSorts();
  }
  $ret = NULL;
  return $ret;
}