Pagination
in component
Extended pagination class. It renders the standard pagination and the results text.
Table of Contents
Properties
Methods
- __construct() : mixed
- $params — array with keys: total — total number of records; page — current page;
limit — records per page (the admin pagination setting by default); url — page url with '{page}'. - getPagination() : string
- Renders the pagination with the 'common/pagination' controller.
- getResults() : string
- Returns a text like 'Showing 1 to 20 of 100 (5 Pages)'.
Properties
$limit
public
mixed
$limit
= 20
$page
public
mixed
$page
= 1
$total
public
mixed
$total
= 0
$url
public
mixed
$url
= ''
$config
protected
mixed
$config
$language
protected
mixed
$language
$load
protected
mixed
$load
$registry
protected
mixed
$registry
Methods
__construct()
$params — array with keys: total — total number of records; page — current page; limit — records per page (the admin pagination setting by default); url — page url with '{page}'.
public
__construct(mixed $params) : mixed
Parameters
- $params : mixed
getPagination()
Renders the pagination with the 'common/pagination' controller.
public
getPagination() : string
Return values
stringgetResults()
Returns a text like 'Showing 1 to 20 of 100 (5 Pages)'.
public
getResults([mixed $text = '' ]) : string
$text — sprintf format; the 'text_pagination' language string by default.
Parameters
- $text : mixed = ''