You are here

public function views_handler_argument::summary_sort in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 handlers/views_handler_argument.inc \views_handler_argument::summary_sort()
  2. 6.2 handlers/views_handler_argument.inc \views_handler_argument::summary_sort()

Sorts the summary based upon the user's selection.

The base variant of this is usually adequte.

Parameters

string $order: The order selected in the UI.

string $by: Optional alias for this field.

1 call to views_handler_argument::summary_sort()
views_handler_argument::default_summary in handlers/views_handler_argument.inc
Default action: summary.

File

handlers/views_handler_argument.inc, line 975
Definition of views_handler_argument.

Class

views_handler_argument
Base class for arguments.

Code

public function summary_sort($order, $by = NULL) {
  $this->query
    ->add_orderby(NULL, NULL, $order, !empty($by) ? $by : $this->name_alias);
}