- Symphony 2.3.5
-
› assets
14 -
› boot
11 -
› content
24 -
› core
23 -
› cryptography
4 -
› email-gateways
3 -
› global
39 -
› interface
6 -
› toolkit
68 - Delegates94
- Deprecated30
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class Sortable
class.sortable.php #18This class handles sortable objects via the $_REQUEST
parameters. Sortable
standardizes the ordering parameters, and provides a method, buildTableHeaders
,
which builds the correct URL's and markup to sort backend objects and update the
Table UI appropriately.
This class is designed to work in the Symphony backend only, and not on the Frontend.
Methods
static array buildTableHeaders(
$columns, $sort, $order, $extra_url_params)
This method builds the markup for sorting-aware table headers. It accepts an
$columns
array, as well as the current sorting axis $sort
and the
current sort order, $order
. If $extra_url_params
are provided, they are
appended to the redirect string upon clicking on a table header.
'label' => 'Column label',
'sortable' => (true|false),
'handle' => 'handle for the column (i.e. the field ID), used as value for $sort',
'attrs' => array(
'HTML <a> attribute' => 'value',
[...]
)
Parameters
Returns
An array of table headers that can be directly passed to Widget::TableHead
.
static void initialize(
$object, $result, $sort, $order, $params)
This method initializes the $result
, $sort
and $order
variables by using the
$_REQUEST
array. The $result
is passed by reference, and is return of calling the
$object->sort()
method. It is this method that actually invokes the sorting inside
the $object
.