Go to the source code of this file.
Functions | |
tablesort_init ($header) | |
tablesort_sql ($header, $before= '') | |
tablesort_header ($cell, $header, $ts) | |
tablesort_cell ($cell, $header, $ts, $i) | |
tablesort_get_querystring () | |
tablesort_get_order ($headers) | |
tablesort_get_sort ($headers) |
All tables created with a call to theme('table') have the option of having column headers that the user can click on to sort the table by that column.
Definition in file tablesort.inc.
tablesort_cell | ( | $ | cell, | |
$ | header, | |||
$ | ts, | |||
$ | i | |||
) |
Format a table cell.
Adds a class attribute to all cells in the currently active column.
$cell | The cell to format. | |
$header | An array of column headers in the format described in theme_table(). | |
$ts | The current table sort context as returned from tablesort_init(). | |
$i | The index of the cell's table column. |
Definition at line 114 of file tablesort.inc.
References $header.
Referenced by theme_table().
tablesort_get_order | ( | $ | headers | ) |
Determine the current sort criterion.
$headers | An array of column headers in the format described in theme_table(). |
Definition at line 152 of file tablesort.inc.
References $header.
Referenced by tablesort_init().
tablesort_get_querystring | ( | ) |
Compose a query string to append to table sorting requests.
Definition at line 138 of file tablesort.inc.
References drupal_query_string_encode().
Referenced by tablesort_init().
tablesort_get_sort | ( | $ | headers | ) |
Determine the current sort direction.
$headers | An array of column headers in the format described in theme_table(). |
Definition at line 187 of file tablesort.inc.
References $header.
Referenced by tablesort_init().
tablesort_header | ( | $ | cell, | |
$ | header, | |||
$ | ts | |||
) |
Format a column header.
If the cell in question is the column header for the current sort criterion, it gets special formatting. All possible sort criteria become links.
$cell | The cell to format. | |
$header | An array of column headers in the format described in theme_table(). | |
$ts | The current table sort context as returned from tablesort_init(). |
Definition at line 68 of file tablesort.inc.
References $title, l(), t(), and theme().
Referenced by theme_table().
tablesort_init | ( | $ | header | ) |
Initialize the table sort context.
Definition at line 15 of file tablesort.inc.
References $header, tablesort_get_order(), tablesort_get_querystring(), and tablesort_get_sort().
Referenced by tablesort_sql(), and theme_table().