W3cubDocs

/Drupal 8

function tablesort_init

tablesort_init($header)

Initializes the table sort context.

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!tablesort.inc/function/tablesort_init/8.1.x