1 views_handler_field_field.inc | views_handler_field_field::click_sort($order) |
Called to determine what to tell the click sorter.
Overrides views_handler_field::click_sort
File
- core/
modules/ field/ views/ views_handler_field_field.inc, line 316 - Definition of views_handler_field_field.
Class
- views_handler_field_field
- A field that displays fieldapi fields.
Code
function click_sort($order) {
// No column selected, can't continue.
if (empty($this->options['click_sort_column'])) {
return;
}
$this->ensure_my_table();
$column = _field_sql_storage_columnname($this->definition['field_name'], $this->options['click_sort_column']);
if (!isset($this->aliases[$column])) {
// Column is not in query; add a sort on it (without adding the column).
$this->aliases[$column] = $this->table_alias . '.' . $column;
}
$this->query->add_orderby(NULL, NULL, $order, $this->aliases[$column]);
}