public function DisplayPrice::clickSort in Ubercart 8.4
Adds an ORDER BY clause to the query for click sort columns.
Parameters
string $order: Either ASC or DESC
Overrides FieldPluginBase::clickSort
File
- uc_product/
src/ Plugin/ views/ field/ DisplayPrice.php, line 49
Class
- DisplayPrice
- Field handler to provide formatted display prices.
Namespace
Drupal\uc_product\Plugin\views\fieldCode
public function clickSort($order) {
$params = $this->options['group_type'] != 'group' ? [
'function' => $this->options['group_type'],
] : [];
$this->query
->addOrderBy(NULL, NULL, $order, 'price', $params);
}