function tablesort_init

Initialize the table sort context.

3 calls to tablesort_init()
TableSortExtenderUnitTest::testTableSortInit in drupal/core/modules/system/lib/Drupal/system/Tests/Common/TableSortExtenderUnitTest.php
Tests tablesort_init().
template_preprocess_forum_topic_list in drupal/core/modules/forum/forum.module
Preprocesses variables for forum-topic-list.tpl.php.
theme_table in drupal/core/includes/theme.inc
Returns HTML for a table.

File

drupal/core/includes/tablesort.inc, line 18
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;
}