public function SearchApiFieldTrait::clickSort in Search API 8
Adds an ORDER BY clause to the query for click sort columns.
Parameters
string $order: Either "ASC" or "DESC".
See also
\Drupal\views\Plugin\views\field\FieldHandlerInterface::clickSort()
File
- src/
Plugin/ views/ field/ SearchApiFieldTrait.php, line 308
Class
- SearchApiFieldTrait
- Provides a trait to use for Search API Views field handlers.
Namespace
Drupal\search_api\Plugin\views\fieldCode
public function clickSort($order) {
$this
->getQuery()
->sort($this->definition['search_api field'], $order);
}