function FieldPluginBase::click_sort

Called to determine what to tell the clicksorter.

1 method overrides FieldPluginBase::click_sort()
Field::click_sort in drupal/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
Called to determine what to tell the clicksorter.

File

drupal/core/modules/views/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\field

Code

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);
  }
}