[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Pagination/ -> Pagination.php (summary)

Joomla! Content Management System

Copyright: (C) 2006 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 742 lines (23 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

Pagination:: (19 methods):
  __construct()
  setAdditionalUrlParam()
  getAdditionalUrlParam()
  getRowOffset()
  getData()
  getPagesCounter()
  getResultsCounter()
  getPagesLinks()
  getPaginationLinks()
  getPaginationPages()
  getListFooter()
  getLimitBox()
  orderUpIcon()
  orderDownIcon()
  _list_footer()
  _list_render()
  _item_active()
  _item_inactive()
  _buildDataObject()


Class: Pagination  - X-Ref

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

__construct($total, $limitstart, $limit, $prefix = '', CMSApplication $app = null)   X-Ref
Constructor.

param: integer         $total       The total number of items.
param: integer         $limitstart  The offset of the item to start at.
param: integer         $limit       The number of items to display per page.
param: string          $prefix      The prefix used for request variables.
param: CMSApplication  $app         The application object

setAdditionalUrlParam($key, $value)   X-Ref
Method to set an additional URL parameter to be added to all pagination class generated
links.

param: string  $key    The name of the URL parameter for which to set a value.
param: mixed   $value  The value to set for the URL parameter.
return: mixed  The old value for the parameter.

getAdditionalUrlParam($key)   X-Ref
Method to get an additional URL parameter (if it exists) to be added to
all pagination class generated links.

param: string  $key  The name of the URL parameter for which to get the value.
return: mixed  The value if it exists or null if it does not.

getRowOffset($index)   X-Ref
Return the rationalised offset for a row with a given index.

param: integer  $index  The row index
return: integer  Rationalised offset for a row with a given index.

getData()   X-Ref
Return the pagination data object, only creating it if it doesn't already exist.

return: \stdClass  Pagination data object.

getPagesCounter()   X-Ref
Create and return the pagination pages counter string, ie. Page 2 of 4.

return: string   Pagination pages counter string.

getResultsCounter()   X-Ref
Create and return the pagination result set counter string, e.g. Results 1-10 of 42

return: string   Pagination result set counter string.

getPagesLinks()   X-Ref
Create and return the pagination page list string, ie. Previous, Next, 1 2 3 ... x.

return: string  Pagination page list string.

getPaginationLinks($layoutId = 'joomla.pagination.links', $options = array()   X-Ref
Get the pagination links

param: string  $layoutId  Layout to render the links
param: array   $options   Optional array with settings for the layout
return: string  Pagination links.

getPaginationPages()   X-Ref
Create and return the pagination pages list, ie. Previous, Next, 1 2 3 ... x.

return: array  Pagination pages list.

getListFooter()   X-Ref
Return the pagination footer.

return: string  Pagination footer.

getLimitBox()   X-Ref
Creates a dropdown box for selecting how many records to show per page.

return: string  The HTML for the limit # input box.

orderUpIcon($i, $condition = true, $task = 'orderup', $alt = 'JLIB_HTML_MOVE_UP', $enabled = true, $checkbox = 'cb')   X-Ref
Return the icon to move an item UP.

param: integer  $i          The row index.
param: boolean  $condition  True to show the icon.
param: string   $task       The task to fire.
param: string   $alt        The image alternative text string.
param: boolean  $enabled    An optional setting for access control on the action.
param: string   $checkbox   An optional prefix for checkboxes.
return: string   Either the icon to move an item up or a space.

orderDownIcon($i, $n, $condition = true, $task = 'orderdown', $alt = 'JLIB_HTML_MOVE_DOWN', $enabled = true, $checkbox = 'cb')   X-Ref
Return the icon to move an item DOWN.

param: integer  $i          The row index.
param: integer  $n          The number of items in the list.
param: boolean  $condition  True to show the icon.
param: string   $task       The task to fire.
param: string   $alt        The image alternative text string.
param: boolean  $enabled    An optional setting for access control on the action.
param: string   $checkbox   An optional prefix for checkboxes.
return: string   Either the icon to move an item down or a space.

_list_footer($list)   X-Ref
Create the HTML for a list footer

param: array  $list  Pagination list data structure.
return: string  HTML for a list footer

_list_render($list)   X-Ref
Create the html for a list footer

param: array  $list  Pagination list data structure.
return: string  HTML for a list start, previous, next,end

_item_active(PaginationObject $item)   X-Ref
Method to create an active pagination link to the item

param: PaginationObject  $item  The object with which to make an active link.
return: string  HTML link

_item_inactive(PaginationObject $item)   X-Ref
Method to create an inactive pagination string

param: PaginationObject  $item  The item to be processed
return: string

_buildDataObject()   X-Ref
Create and return the pagination data object.

return: \stdClass  Pagination data object.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer