Class JPagination

Description

Pagination Class. Provides a common interface for content pagination for the Joomla! Platform.

  • since: 11.1

Located in /libraries/joomla/html/pagination.php (line 20)

JObject
   |
   --JPagination
Variable Summary
integer $limit
integer $limitstart
integer $prefix
integer $total
boolean $_viewall
Method Summary
JPagination __construct (integer $total, integer $limitstart, integer $limit, [string $prefix = ''])
mixed getAdditionalUrlParam (string $key)
object Pagination getData ()
string getLimitBox ()
string getListFooter ()
string getPagesCounter ()
string getPagesLinks ()
string getResultsCounter ()
integer getRowOffset (integer $index)
string orderDownIcon (integer $i, integer $n, [boolean $condition = true], [string $task = 'orderdown'], [string $alt = 'JLIB_HTML_MOVE_DOWN'], [boolean $enabled = true], [string $checkbox = 'cb'])
string orderUpIcon (integer $i, [boolean $condition = true], [string $task = 'orderup'], [string $alt = 'JLIB_HTML_MOVE_UP'], [boolean $enabled = true], [string $checkbox = 'cb'])
mixed setAdditionalUrlParam (string $key, mixed $value)
object Pagination _buildDataObject ()
string _item_active (JPaginationObject &$item)
string _item_inactive (object &$item)
string _list_footer (array $list)
string _list_render (array $list)
Variables
integer $limit = null (line 32)
  • var: Number of rows to display per page.
  • since: 11.1
  • access: public
integer $limitstart = null (line 26)
  • var: The record number to start displaying from.
  • since: 11.1
  • access: public
integer $prefix = null (line 44)
  • var: Prefix used for request variables.
  • since: 11.1
  • access: public
integer $total = null (line 38)
  • var: Total number of rows.
  • since: 11.1
  • access: public
array $_additionalUrlParams = array() (line 59)

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.

  • since: 11.1
  • access: protected
boolean $_viewall = false (line 50)
  • var: View all flag
  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 71)

Constructor.

  • since: 11.1
  • access: public
JPagination __construct (integer $total, integer $limitstart, integer $limit, [string $prefix = ''])
  • integer $total: The total number of items.
  • integer $limitstart: The offset of the item to start at.
  • integer $limit: The number of items to display per page.
  • string $prefix: The prefix used for request variables.

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
getAdditionalUrlParam (line 176)

Method to get an additional URL parameter (if it exists) to be added to all pagination class generated links.

  • return: The value if it exists or null if it does not.
  • since: 11.1
  • access: public
mixed getAdditionalUrlParam (string $key)
  • string $key: The name of the URL parameter for which to get the value.
getData (line 204)

Return the pagination data object, only creating it if it doesn't already exist.

  • return: data object.
  • since: 11.1
  • access: public
object Pagination getData ()
getLimitBox (line 422)

Creates a dropdown box for selecting how many records to show per page.

  • return: The HTML for the limit # input box.
  • since: 11.1
  • access: public
string getLimitBox ()
getListFooter (line 390)

Return the pagination footer.

  • return: Pagination footer.
  • since: 11.1
  • access: public
string getListFooter ()
getPagesCounter (line 221)

Create and return the pagination pages counter string, ie. Page 2 of 4.

  • return: Pagination pages counter string.
  • since: 11.1
  • access: public
string getPagesCounter ()
getPagesLinks (line 276)

Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.

  • return: Pagination page list string.
  • since: 11.1
  • access: public
string getPagesLinks ()
getResultsCounter (line 239)

Create and return the pagination result set counter string, e.g. Results 1-10 of 42

  • return: Pagination result set counter string.
  • since: 11.1
  • access: public
string getResultsCounter ()
getRowOffset (line 192)

Return the rationalised offset for a row with a given index.

  • return: Rationalised offset for a row with a given index.
  • since: 11.1
  • access: public
integer getRowOffset (integer $index)
  • integer $index: The row index
orderDownIcon (line 509)

Return the icon to move an item DOWN.

  • return: Either the icon to move an item down or a space.
  • since: 11.1
  • access: public
string orderDownIcon (integer $i, integer $n, [boolean $condition = true], [string $task = 'orderdown'], [string $alt = 'JLIB_HTML_MOVE_DOWN'], [boolean $enabled = true], [string $checkbox = 'cb'])
  • integer $i: The row index.
  • integer $n: The number of items in the list.
  • boolean $condition: True to show the icon.
  • string $task: The task to fire.
  • string $alt: The image alternative text string.
  • boolean $enabled: An optional setting for access control on the action.
  • string $checkbox: An optional prefix for checkboxes.
orderUpIcon (line 482)

Return the icon to move an item UP.

  • return: Either the icon to move an item up or a space.
  • since: 11.1
  • access: public
string orderUpIcon (integer $i, [boolean $condition = true], [string $task = 'orderup'], [string $alt = 'JLIB_HTML_MOVE_UP'], [boolean $enabled = true], [string $checkbox = 'cb'])
  • integer $i: The row index.
  • boolean $condition: True to show the icon.
  • string $task: The task to fire.
  • string $alt: The image alternative text string.
  • boolean $enabled: An optional setting for access control on the action.
  • string $checkbox: An optional prefix for checkboxes.
setAdditionalUrlParam (line 148)

Method to set an additional URL parameter to be added to all pagination class generated links.

  • return: The old value for the parameter.
  • since: 11.1
  • access: public
mixed setAdditionalUrlParam (string $key, mixed $value)
  • string $key: The name of the URL parameter for which to set a value.
  • mixed $value: The value to set for the URL parameter.
_buildDataObject (line 630)

Create and return the pagination data object.

  • return: data object.
  • since: 11.1
  • access: protected
object Pagination _buildDataObject ()
_item_active (line 579)

Method to create an active pagination link to the item

  • return: HTML link
  • since: 11.1
  • access: protected
string _item_active (JPaginationObject &$item)
_item_inactive (line 610)

Method to create an inactive pagination string

  • since: 11.1
  • access: protected
string _item_inactive (object &$item)
  • object &$item: The item to be processed
_list_footer (line 530)

Create the HTML for a list footer

  • return: HTML for a list footer
  • since: 11.1
  • access: protected
string _list_footer (array $list)
  • array $list: Pagination list data structure.
_list_render (line 553)

Create the html for a list footer

  • return: HTML for a list start, previous, next,end
  • since: 11.1
  • access: protected
string _list_render (array $list)
  • array $list: Pagination list data structure.

Inherited Methods

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:58:33 -0500 by phpDocumentor 1.4.4