DataTablesJs
in package
DataTables class that work with datatables.net (JS).
Tags
Table of Contents
Methods
- buildSortOrdersFromInput() : array<string|int, mixed>
- Build sort & order values from parameters such as GET method.
Methods
buildSortOrdersFromInput()
Build sort & order values from parameters such as GET method.
public
buildSortOrdersFromInput([array<string|int, mixed> $columns = [] ][, array<string|int, mixed> $order = [] ]) : array<string|int, mixed>
Parameters
- $columns : array<string|int, mixed> = []
-
The array from
$_GETvalue of 'columns' name. - $order : array<string|int, mixed> = []
-
The array from
$_GETvalue of 'order' name.
Tags
Return values
array<string|int, mixed> —Return array list of sort & order values by the order of multi sort. Example:
array(
array(
'sort' => 'my_field_name1',
'order' => 'asc',
),
array(
'sort' => 'my_field_name2',
'order' => 'asc',
),
);