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 getPage()

getPage() public method Returns the zero-based current page number. public integer getPage ( $recalculate = false )$recalculate boolean Whether to recalculate the current page based on the page size and item count. return integer The zero-based current page number.

data\Pagination getOffset()

getOffset() public method public integer getOffset ( )return integer The offset of the data. This may be used to set the OFFSET value for a SQL statement for fetching the current page of data.

data\Pagination getPageCount()

getPageCount() public method public integer getPageCount ( )return integer Number of pages

data\Pagination getLinks()

getLinks() public method Returns a whole set of links for navigating to the first, last, next and previous pages. public array getLinks ( $absolute = false )$absolute boolean Whether the generated URLs should be absolute. return array The links for navigational purpose. The array keys specify the purpose of the links (e.g. LINK_FIRST), and the array values are the corresponding URLs.

data\Pagination createUrl()

createUrl() public method Creates the URL suitable for pagination with the specified page number. This method is mainly called by pagers when creating URLs used to perform pagination. See also: $params $forcePageParam public string createUrl ( $page, $pageSize = null, $absolute = false )$page integer The zero-based page number that the URL should point to. $pageSize integer The number of items on each page. If not set, the value of $pageSize will be used. $absolute boolean Whether to

data\Pagination getLimit()

getLimit() public method public integer getLimit ( )return integer The limit of the data. This may be used to set the LIMIT value for a SQL statement for fetching the current page of data. Note that if the page size is infinite, a value -1 will be returned.

data\Pagination $validatePage

$validatePage public property Whether to check if $page is within valid range. When this property is true, the value of $page will always be between 0 and ($pageCount-1). Because $pageCount relies on the correct value of $totalCount which may not be available in some cases (e.g. MongoDB), you may want to set this property to be false to disable the page number validation. By doing so, $page will return the value indexed by $pageParam in $params. public boolean $validatePage = true

data\Pagination $route

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

data\Pagination $params

$params public property Parameters (name => value) that should be used to obtain the current page number and to create new pagination URLs. If not set, all parameters from $_GET will be used instead. In order to add hash to all links use array_merge($_GET, ['#' => 'my-hash']). The array element indexed by $pageParam is considered to be the current page number (defaults to 0); while the element indexed by $pageSizeParam is treated as the page size (defaults to $defaultPageSize). publi