public function Date::clickSort in Views XML Backend 8
Adds an ORDER BY clause to the query for click sort columns.
Parameters
string $order: Either ASC or DESC
Overrides FieldPluginBase::clickSort
File
- src/
Plugin/ views/ field/ Date.php, line 64 - Contains \Drupal\views_xml_backend\Plugin\views\field\Date.
Class
- Date
- A handler to provide an XML date field.
Namespace
Drupal\views_xml_backend\Plugin\views\fieldCode
public function clickSort($order) {
$this->query
->addSort(new DateSorter($this->field_alias, $order));
}