class JPagination extends JObject


Located at : UKNOWVA_ROOT/libraries/joomla/html/pagination.php

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

Properties

integer $limitstart The record number to start dislpaying from.
integer $limit Number of rows to display per page.
integer $total Total number of rows.
integer $prefix Prefix used for request variables.
$_showtotalcount Constructor.

Methods

__construct($total, $limitstart, $limit, $prefix = '')

Class constructor, overridden in descendant classes.

string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

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

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

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

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
mixed
setAdditionalUrlParam(string $key, mixed $value)

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

mixed
getAdditionalUrlParam(string $key)

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

integer
getRowOffset(integer $index)

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

object
getData()

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

string
getPagesCounter()

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

string
getResultsCounter()

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

string
getPagesLinks()

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

string
getListFooter()

Return the pagination footer.

string
getLimitBox()

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

string
orderUpIcon(integer $i, boolean $condition = true, string $task = 'orderup', string $alt = 'JLIB_HTML_MOVE_UP', boolean $enabled = true, string $checkbox = 'cb')

Return the icon to move an item UP.

string
orderDownIcon(integer $i, integer $n, boolean $condition = true, string $task = 'orderdown', string $alt = 'JLIB_HTML_MOVE_DOWN', boolean $enabled = true, string $checkbox = 'cb')

Return the icon to move an item DOWN.

Details

at line 81
JObject __construct($total, $limitstart, $limit, $prefix = '')

Class constructor, overridden in descendant classes.

Parameters

$total
$limitstart
$limit
$prefix

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

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

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

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

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

at line 148
mixed setAdditionalUrlParam(string $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.

Return Value

mixed The old value for the parameter.

at line 174
mixed getAdditionalUrlParam(string $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.

Return Value

mixed The value if it exists or null if it does not.

at line 189
integer getRowOffset(integer $index)

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

Parameters

integer $index The row index

Return Value

integer Rationalised offset for a row with a given index.

at line 200
object getData()

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

Return Value

object Pagination data object.

at line 215
string getPagesCounter()

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

Return Value

string Pagination pages counter string.

at line 233
string getResultsCounter()

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

Return Value

string Pagination result set counter string.

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

.. x.

Return Value

string Pagination page list string.

at line 359
string getListFooter()

Return the pagination footer.

Return Value

string Pagination footer.

at line 389
string getLimitBox()

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

Return Value

string The HTML for the limit # input box.

at line 429
string orderUpIcon(integer $i, boolean $condition = true, string $task = 'orderup', string $alt = 'JLIB_HTML_MOVE_UP', boolean $enabled = true, string $checkbox = 'cb')

Return the icon to move an item UP.

Parameters

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.

Return Value

string Either the icon to move an item up or a space.

at line 453
string orderDownIcon(integer $i, integer $n, boolean $condition = true, string $task = 'orderdown', string $alt = 'JLIB_HTML_MOVE_DOWN', boolean $enabled = true, string $checkbox = 'cb')

Return the icon to move an item DOWN.

Parameters

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.

Return Value

string Either the icon to move an item down or a space.