Back to Joomla project (class list)

Class Pagination - list of methods

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

Direct known subclasses

Package: Joomla\CMS\Pagination
Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Pagination/Pagination.php
Project: Joomla

Method Summary

public
(mixed $total, mixed $limitstart, mixed $limit, mixed $prefix = '', \Joomla\CMS\Application\CMSApplication $app = null)

Constructor.
Parameters
  • int $total The total number of items.
  • int $limitstart The offset of the item to start at.
  • int $limit The number of items to display per page.
  • string $prefix The prefix used for request variables.
  • \Joomla\CMS\Application\CMSApplication $app The application object
Since
  • 1.5
Show source code of this method: __construct Source Code

public mixed
(mixed $key, mixed $value)

Method to set an additional URL parameter to be added to all pagination class generated links.
Parameters
  • string $key The name of the URL parameter for which to set a value.
  • mixed $value The value to set for the URL parameter.
Returns
  • mixed The old value for the parameter.
Since
  • 1.6
Show source code of this method: setAdditionalUrlParam Source Code

public mixed
(mixed $key)

Method to get an additional URL parameter (if it exists) to be added to all pagination class generated links.
Parameters
  • string $key The name of the URL parameter for which to get the value.
Returns
  • mixed The value if it exists or null if it does not.
Since
  • 1.6
Show source code of this method: getAdditionalUrlParam Source Code

public int
(mixed $index)

Return the rationalised offset for a row with a given index.
Parameters
  • int $index The row index
Returns
  • int Rationalised offset for a row with a given index.
Since
  • 1.5
Show source code of this method: getRowOffset Source Code

public \stdClass
()

Return the pagination data object, only creating it if it doesn't already exist.
Returns
  • \stdClass Pagination data object.
Since
  • 1.5
Show source code of this method: getData Source Code

public string
()

Create and return the pagination pages counter string, ie. Page 2 of 4.
Returns
  • string Pagination pages counter string.
Since
  • 1.5
Show source code of this method: getPagesCounter Source Code

public string
()

Create and return the pagination result set counter string, e.g. Results 1-10 of 42
Returns
  • string Pagination result set counter string.
Since
  • 1.5
Show source code of this method: getResultsCounter Source Code

public string
()

Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.
Returns
  • string Pagination page list string.
Since
  • 1.5
Show source code of this method: getPagesLinks Source Code

public string
(mixed $layoutId = 'joomla.pagination.links', mixed $options = array())

Get the pagination links
Parameters
  • string $layoutId Layout to render the links
  • array $options Optional array with settings for the layout
Returns
  • string Pagination links.
Since
  • 3.3
Show source code of this method: getPaginationLinks Source Code

public array
()

Create and return the pagination pages list, ie. Previous, Next, 1 2 3 ... x.
Returns
  • array Pagination pages list.
Since
  • 3.3
Show source code of this method: getPaginationPages Source Code

public string
()

Return the pagination footer.
Returns
  • string Pagination footer.
Since
  • 1.5
Show source code of this method: getListFooter Source Code

public string
()

Creates a dropdown box for selecting how many records to show per page.
Returns
  • string The HTML for the limit # input box.
Since
  • 1.5
Show source code of this method: getLimitBox Source Code

public string
(mixed $i, mixed $condition = true, mixed $task = 'orderup', mixed $alt = 'JLIB_HTML_MOVE_UP', mixed $enabled = true, mixed $checkbox = 'cb')

Return the icon to move an item UP.
Parameters
  • int $i The row index.
  • bool $condition True to show the icon.
  • string $task The task to fire.
  • string $alt The image alternative text string.
  • bool $enabled An optional setting for access control on the action.
  • string $checkbox An optional prefix for checkboxes.
Returns
  • string Either the icon to move an item up or a space.
Since
  • 1.5
Show source code of this method: orderUpIcon Source Code

public string
(mixed $i, mixed $n, mixed $condition = true, mixed $task = 'orderdown', mixed $alt = 'JLIB_HTML_MOVE_DOWN', mixed $enabled = true, mixed $checkbox = 'cb')

Return the icon to move an item DOWN.
Parameters
  • int $i The row index.
  • int $n The number of items in the list.
  • bool $condition True to show the icon.
  • string $task The task to fire.
  • string $alt The image alternative text string.
  • bool $enabled An optional setting for access control on the action.
  • string $checkbox An optional prefix for checkboxes.
Returns
  • string Either the icon to move an item down or a space.
Since
  • 1.5
Show source code of this method: orderDownIcon Source Code

protected string
(mixed $list)

Create the HTML for a list footer
Parameters
  • array $list Pagination list data structure.
Returns
  • string HTML for a list footer
Since
  • 1.5
Show source code of this method: _list_footer Source Code

protected string
(mixed $list)

Create the html for a list footer
Parameters
  • array $list Pagination list data structure.
Returns
  • string HTML for a list start, previous, next,end
Since
  • 1.5
Show source code of this method: _list_render Source Code

protected string
(\Joomla\CMS\Pagination\PaginationObject $item)

Method to create an active pagination link to the item
Parameters
  • \Joomla\CMS\Pagination\PaginationObject $item The object with which to make an active link.
Returns
  • string HTML link
Since
  • 1.5
Show source code of this method: _item_active Source Code

protected string
(\Joomla\CMS\Pagination\PaginationObject $item)

Method to create an inactive pagination string
Parameters
  • \Joomla\CMS\Pagination\PaginationObject $item The item to be processed
Returns
  • string
Since
  • 1.5
Show source code of this method: _item_inactive Source Code

protected \stdClass
()

Create and return the pagination data object.
Returns
  • \stdClass Pagination data object.
Since
  • 1.5
Show source code of this method: _buildDataObject Source Code

Properties Summary

public int
$limitstart
Since
  • 1.5
public int
$limit
Since
  • 1.5
public int
$total
Since
  • 1.5
public int
$prefix
Since
  • 1.6
public int
$pagesStart
Since
  • 3.0
public int
$pagesStop
Since
  • 3.0
public int
$pagesCurrent
Since
  • 3.0
public int
$pagesTotal
Since
  • 3.0
public bool
$hideEmptyLimitstart
Since
  • 3.9.0
protected bool
$viewall
Since
  • 3.0
protected array
$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.
Since
  • 3.0
protected \Joomla\CMS\Application\CMSApplication
$app
Since
  • 3.4
protected object
$data
Pagination data object
Since
  • 3.4

Tags Summary

Since
1.5