You are here

function tablesort_init in Drupal 7

Same name and namespace in other branches
  1. 8 core/includes/tablesort.inc \tablesort_init()
  2. 4 includes/tablesort.inc \tablesort_init()
  3. 5 includes/tablesort.inc \tablesort_init()
  4. 6 includes/tablesort.inc \tablesort_init()

Initialize the table sort context.

3 calls to tablesort_init()
TableSortTest::testTableSortInit in modules/simpletest/tests/tablesort.test
Test tablesort_init().
template_preprocess_forum_topic_list in modules/forum/forum.module
Preprocesses variables for forum-topic-list.tpl.php.
theme_table in includes/theme.inc
Returns HTML for a table.

File

includes/tablesort.inc, line 109
Functions to aid in the creation of sortable tables.

Code

function tablesort_init($header) {
  $ts = tablesort_get_order($header);
  $ts['sort'] = tablesort_get_sort($header);
  $ts['query'] = tablesort_get_query_parameters();
  return $ts;
}