You are here

public function Standard::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/Standard.php, line 47
Contains \Drupal\views_xml_backend\Plugin\views\field\Standard.

Class

Standard
A handler to provide an XML text field.

Namespace

Drupal\views_xml_backend\Plugin\views\field

Code

public function clickSort($order) {
  $this->query
    ->addSort(new StringSorter($this->field_alias, $order));
}