1.20.x views_handler_field_field.inc views_handler_field_field::click_sortable()

Determine if this field is click sortable.

Overrides views_handler_field::click_sortable

File

modules/field/views/views_handler_field_field.inc, line 299
Definition of views_handler_field_field.

Class

views_handler_field_field
A field that displays fieldapi fields.

Code

function click_sortable() {
  // Not click sortable in any case.
  if (empty($this->definition['click sortable'])) {
    return FALSE;
  }
  // A field is not click sortable if it's a multiple field with
  // "group multiple values" checked, since a click sort in that case would
  // add a join to the field table, which would produce unwanted duplicates.
  if ($this->multiple && $this->options['group_rows']) {
    return FALSE;
  }
  return TRUE;
}