Pagination
Pagination Class. Provides a common interface for content pagination for the Joomla! CMS.
since |
1.5 |
---|---|
package |
Joomla CMS |
Methods
__construct
Constructor.
__construct(int total, int limitstart, int limit, string prefix = '', \Joomla\CMS\Application\CMSApplication app = null) : mixed
since |
1.5 |
---|
Arguments
- total
int
The total number of items.- limitstart
int
The offset of the item to start at.- limit
int
The number of items to display per page.- prefix
string
The prefix used for request variables.- app
\Joomla\CMS\Application\CMSApplication
The application object
Response
mixed
_buildDataObject
Create and return the pagination data object.
_buildDataObject() : \stdClass
since |
1.5 |
---|
Response
\stdClass
Pagination data object.
_item_active
Method to create an active pagination link to the item
_item_active(\Joomla\CMS\Pagination\PaginationObject item) : string
since |
1.5 |
---|
Arguments
- item
\Joomla\CMS\Pagination\PaginationObject
The object with which to make an active link.
Response
string
HTML link
_item_inactive
Method to create an inactive pagination string
_item_inactive(\Joomla\CMS\Pagination\PaginationObject item) : string
since |
1.5 |
---|
Arguments
- item
\Joomla\CMS\Pagination\PaginationObject
The item to be processed
Response
string
_list_render
Create the html for a list footer
_list_render(array list) : string
since |
1.5 |
---|
Arguments
- list
array
Pagination list data structure.
Response
string
HTML for a list start, previous, next,end
getAdditionalUrlParam
Method to get an additional URL parameter (if it exists) to be added to all pagination class generated links.
getAdditionalUrlParam(string key) : mixed
since |
1.6 |
---|
Arguments
- key
string
The name of the URL parameter for which to get the value.
Response
mixed
The value if it exists or null if it does not.
getData
Return the pagination data object, only creating it if it doesn't already exist.
getData() : \stdClass
since |
1.5 |
---|
Response
\stdClass
Pagination data object.
getLimitBox
Creates a dropdown box for selecting how many records to show per page.
getLimitBox() : string
since |
1.5 |
---|
Response
string
The HTML for the limit # input box.
getPagesCounter
Create and return the pagination pages counter string, ie. Page 2 of 4.
getPagesCounter() : string
since |
1.5 |
---|
Response
string
Pagination pages counter string.
getPagesLinks
Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
getPagesLinks() : string
since |
1.5 |
---|
Response
string
Pagination page list string.
getPaginationLinks
Get the pagination links
getPaginationLinks(string layoutId = 'joomla.pagination.links', array options = array()) : string
since |
3.3 |
---|
Arguments
- layoutId
string
Layout to render the links- options
array
Optional array with settings for the layout
Response
string
Pagination links.
getPaginationPages
Create and return the pagination pages list, ie. Previous, Next, 1 2 3 ... x.
getPaginationPages() : array
since |
3.3 |
---|
Response
array
Pagination pages list.
getResultsCounter
Create and return the pagination result set counter string, e.g. Results 1-10 of 42
getResultsCounter() : string
since |
1.5 |
---|
Response
string
Pagination result set counter string.
getRowOffset
Return the rationalised offset for a row with a given index.
getRowOffset(int index) : int
since |
1.5 |
---|
Arguments
- index
int
The row index
Response
int
Rationalised offset for a row with a given index.
orderDownIcon
Return the icon to move an item DOWN.
orderDownIcon(int i, int n, bool condition = true, string task = 'orderdown', string alt = 'JLIB_HTML_MOVE_DOWN', bool enabled = true, string checkbox = 'cb') : string
since |
1.5 |
---|
Arguments
- i
int
The row index.- n
int
The number of items in the list.- condition
bool
True to show the icon.- task
string
The task to fire.- alt
string
The image alternative text string.- enabled
bool
An optional setting for access control on the action.- checkbox
string
An optional prefix for checkboxes.
Response
string
Either the icon to move an item down or a space.
orderUpIcon
Return the icon to move an item UP.
orderUpIcon(int i, bool condition = true, string task = 'orderup', string alt = 'JLIB_HTML_MOVE_UP', bool enabled = true, string checkbox = 'cb') : string
since |
1.5 |
---|
Arguments
- i
int
The row index.- condition
bool
True to show the icon.- task
string
The task to fire.- alt
string
The image alternative text string.- enabled
bool
An optional setting for access control on the action.- checkbox
string
An optional prefix for checkboxes.
Response
string
Either the icon to move an item up or a space.
setAdditionalUrlParam
Method to set an additional URL parameter to be added to all pagination class generated links.
setAdditionalUrlParam(string key, mixed value) : mixed
since |
1.6 |
---|
Arguments
- key
string
The name of the URL parameter for which to set a value.- value
mixed
The value to set for the URL parameter.
Response
mixed
The old value for the parameter.
Properties
additionalUrlParams
Additional URL parameters to be added to the pagination URLs generated by the class. These may be useful for filters and extra values when dealing with lists and GET requests.