function TableSort::order

Determine the current sort criterion.

Parameters

$headers: An array of column headers in the format described in theme_table().

Return value

An associative array describing the criterion, containing the keys:

  • "name": The localized title of the table column.
  • "sql": The name of the database field to sort on.
1 call to TableSort::order()
TableSort::init in includes/tablesort.inc
Initializes the table sort context.

File

includes/tablesort.inc, line 101

Class

TableSort
Query extender class for tablesort queries.

Code

protected function order() {
    return tablesort_get_order($this->header);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.