function tablesort_init in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/includes/tablesort.inc \tablesort_init()
Initializes the table sort context.
2 calls to tablesort_init()
- TableSortExtenderUnitTest::testTableSortInit in core/
modules/ system/ src/ Tests/ Common/ TableSortExtenderUnitTest.php - Tests tablesort_init().
- template_preprocess_table in core/
includes/ theme.inc - Prepares variables for table templates.
File
- core/
includes/ tablesort.inc, line 19 - 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;
}