data\Sort $sortParam

$sortParam public property The name of the parameter that specifies which attributes to be sorted in which direction. Defaults to sort. See also $params. public string $sortParam = 'sort'

data\Sort $params

$params public property Parameters (name => value) that should be used to obtain the current sort directions and to create new sort URLs. If not set, $_GET will be used instead. In order to add hash to all links use array_merge($_GET, ['#' => 'my-hash']). The array element indexed by $sortParam is considered to be the current sort directions. If the element does not exist, the default order will be used. See also: $sortParam $defaultOrder public array $params = null

data\Sort $route

$route public property The route of the controller action for displaying the sorted contents. If not set, it means using the currently requested route. public string $route = null

data\Sort $enableMultiSort

$enableMultiSort public property Whether the sorting can be applied to multiple attributes simultaneously. Defaults to false, which means each time the data can only be sorted by one attribute. public boolean $enableMultiSort = false

data\Sort $attributeOrders

$attributeOrders public property Sort directions indexed by attribute names. Sort direction can be either SORT_ASC for ascending order or SORT_DESC for descending order. public array getAttributeOrders ( $recalculate = false )public void setAttributeOrders ( $attributeOrders, $validate = true )

data\Sort $defaultOrder

$defaultOrder public property The order that should be used when the current request does not specify any order. The array keys are attribute names and the array values are the corresponding sort directions. For example, [ 'name' => SORT_ASC, 'created_at' => SORT_DESC, ] See also $attributeOrders. public array $defaultOrder = null

data\Sort $attributes

$attributes public property List of attributes that are allowed to be sorted. Its syntax can be described using the following example: [ 'age', 'name' => [ 'asc' => ['first_name' => SORT_ASC, 'last_name' => SORT_ASC], 'desc' => ['first_name' => SORT_DESC, 'last_name' => SORT_DESC], 'default' => SORT_DESC, 'label' => 'Name', ], ] In the above, two attributes are declared: age and name. The age attribute is a simple attri

data\Pagination setPage()

setPage() public method Sets the current page number. public void setPage ( $value, $validatePage = false )$value integer The zero-based index of the current page. $validatePage boolean Whether to validate the page number. Note that in order to validate the page number, both $validatePage and this parameter must be true.

data\Pagination getQueryParam()

getQueryParam() protected method Returns the value of the specified query parameter. This method returns the named parameter value from $params. Null is returned if the value does not exist. protected string getQueryParam ( $name, $defaultValue = null )$name string The parameter name $defaultValue string The value to be returned when the specified parameter does not exist in $params. return string The parameter value

data\Pagination setPageSize()

setPageSize() public method public void setPageSize ( $value, $validatePageSize = false )$value integer The number of items per page. $validatePageSize boolean Whether to validate page size.