Class JPagination

Description

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

  • since: 1.5

Located in /libraries/cms/pagination/pagination.php (line 19)


	
			
Variable Summary
 integer $limit
 integer $limitstart
 integer $pagesCurrent
 integer $pagesStart
 integer $pagesStop
 integer $pagesTotal
 integer $prefix
 integer $total
 boolean $viewall
Method Summary
 JPagination __construct (integer $total, integer $limitstart, integer $limit, [string $prefix = ''])
 mixed get (string $property, [mixed $default = null])
 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'])
 void set (string $property, [mixed $value = null])
 mixed setAdditionalUrlParam (string $key, mixed $value)
 object Pagination _buildDataObject ()
 string _list_footer (array $list)
 string _list_render (array $list)
Variables
array $additionalUrlParams = array() (line 82)

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: 3.0
  • access: protected
integer $limit = null (line 31)
  • var: Number of rows to display per page.
  • since: 1.5
  • access: public
integer $limitstart = null (line 25)
  • var: The record number to start displaying from.
  • since: 1.5
  • access: public
integer $pagesCurrent (line 61)
  • var: Current page
  • since: 3.0
  • access: public
integer $pagesStart (line 49)
  • var: Value pagination object begins at
  • since: 3.0
  • access: public
integer $pagesStop (line 55)
  • var: Value pagination object ends at
  • since: 3.0
  • access: public
integer $pagesTotal (line 67)
  • var: Total number of pages
  • since: 3.0
  • access: public
integer $prefix = null (line 43)
  • var: Prefix used for request variables.
  • since: 1.6
  • access: public
integer $total = null (line 37)
  • var: Total number of rows.
  • since: 1.5
  • access: public
boolean $viewall = false (line 73)
  • var: View all flag
  • since: 3.0
  • access: protected
Methods
Constructor __construct (line 94)

Constructor.

  • since: 1.5
  • 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.
get (line 787)

Returns a property of the object or the default value if the property is not set.

  • return: The value of the property.
  • deprecated: 4.0 Access the properties directly.
  • since: 3.0
  • access: public
mixed get (string $property, [mixed $default = null])
  • string $property: The name of the property.
  • mixed $default: The default value.
getAdditionalUrlParam (line 202)

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: 1.6
  • access: public
mixed getAdditionalUrlParam (string $key)
  • string $key: The name of the URL parameter for which to get the value.
getData (line 230)

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

  • return: data object.
  • since: 1.5
  • access: public
object Pagination getData ()
getLimitBox (line 459)

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

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

Return the pagination footer.

  • return: Pagination footer.
  • since: 1.5
  • access: public
string getListFooter ()
getPagesCounter (line 249)

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

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

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

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

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

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

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

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

Return the icon to move an item DOWN.

  • return: Either the icon to move an item down or a space.
  • since: 1.5
  • 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 519)

Return the icon to move an item UP.

  • return: Either the icon to move an item up or a space.
  • since: 1.5
  • 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.
set (line 762)

Modifies a property of the object, creating it if it does not already exist.

  • deprecated: 4.0 Access the properties directly.
  • since: 3.0
  • access: public
void set (string $property, [mixed $value = null])
  • string $property: The name of the property.
  • mixed $value: The value of the property to set.
setAdditionalUrlParam (line 174)

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

  • return: The old value for the parameter.
  • since: 1.6
  • 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 673)

Create and return the pagination data object.

  • return: data object.
  • since: 1.5
  • access: protected
object Pagination _buildDataObject ()
_item_active (line 618)

Method to create an active pagination link to the item

  • return: HTML link
  • since: 1.5
  • access: protected
string _item_active (JPaginationObject $item)
_item_inactive (line 652)

Method to create an inactive pagination string

  • since: 1.5
  • access: protected
string _item_inactive (JPaginationObject $item)
_list_footer (line 567)

Create the HTML for a list footer

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

Create the html for a list footer

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

Documentation generated on Tue, 19 Nov 2013 15:10:08 +0100 by phpDocumentor 1.4.3