You are here

public function ViewsPhp::clickSort in Views PHP 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/ViewsPhp.php, line 113
Contains \Drupal\views_php\Plugin\views\field\ViewsPhp.

Class

ViewsPhp
A handler to provide a field that is constructed by the administrator using PHP.

Namespace

Drupal\views_php\Plugin\views\field

Code

public function clickSort($order) {
  $this->php_click_sort_order = $order;
}