function FieldPluginBase::click_sort in Views (for Drupal 7) 8.3
Called to determine what to tell the clicksorter.
1 method overrides FieldPluginBase::click_sort()
- Field::click_sort in lib/
Views/ field/ Plugin/ views/ field/ Field.php - Called to determine what to tell the clicksorter.
File
- lib/
Drupal/ views/ Plugin/ views/ field/ FieldPluginBase.php, line 168 - Definition of Drupal\views\Plugin\views\field\FieldPluginBase.
Class
- FieldPluginBase
- Base field handler that has no options and renders an unformatted field.
Namespace
Drupal\views\Plugin\views\fieldCode
function click_sort($order) {
if (isset($this->field_alias)) {
// Since fields should always have themselves already added, just
// add a sort on the field.
$params = $this->options['group_type'] != 'group' ? array(
'function' => $this->options['group_type'],
) : array();
$this->query
->add_orderby(NULL, NULL, $order, $this->field_alias, $params);
}
}