Function __global->pagination
Definitions
sources/templates_pagination.php
- Get the Tempcode for pagination.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $title | Tempcode | No | No | required parameter | N/A | N/A | The title/name of the resource we are browsing through |
| $start | integer | No | No | required parameter | N/A | N/A | The current position in the browser |
| $start_name | ID_TEXT | No | No | required parameter | N/A | N/A | The parameter name used to store our position in the results (usually, 'start') |
| $max | integer | No | No | required parameter | N/A | N/A | The maximum number of rows to show per browser page |
| $max_name | ID_TEXT | No | No | required parameter | N/A | N/A | The parameter name used to store the total number of results to show per-page (usually, 'max') |
| $max_rows | integer | No | No | required parameter | N/A | N/A | The maximum number of rows in the entire dataset |
| $keep_post | boolean | No | No | False | N/A | N/A | Whether to keep POST data when browsing through and relay it as GET |
| $max_pagination_links | ?integer | No | No | Null | N/A | N/A | The maximum number of quick-jump pagination-links to show (null: configured default) |
| $_selectors | ?array | No | No | Null | N/A | N/A | List of per-page selectors to show (null: show hard-coded ones) |
| $hash | ID_TEXT | No | No | Blank (empty string) | N/A | N/A | Hash component to URL |
| $keyset_value | ?mixed | No | No | Null | N/A | N/A | Keyset-pagination reference value for the 'next' page of results (null: no keyset pagination) |
Returns
- The pagination
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the Tempcode for pagination.
*
* @param Tempcode $title The title/name of the resource we are browsing through
* @param integer $start The current position in the browser
* @param ID_TEXT $start_name The parameter name used to store our position in the results (usually, 'start')
* @param integer $max The maximum number of rows to show per browser page
* @param ID_TEXT $max_name The parameter name used to store the total number of results to show per-page (usually, 'max')
* @param integer $max_rows The maximum number of rows in the entire dataset
* @param boolean $keep_post Whether to keep POST data when browsing through and relay it as GET
* @param ?integer $max_pagination_links The maximum number of quick-jump pagination-links to show (null: configured default)
* @param ?array $_selectors List of per-page selectors to show (null: show hard-coded ones)
* @param ID_TEXT $hash Hash component to URL
* @param ?mixed $keyset_value Keyset-pagination reference value for the 'next' page of results (null: no keyset pagination)
* @return Tempcode The pagination
*/
function pagination(object $title, int $start, string $start_name, int $max, string $max_name, int $max_rows, bool $keep_post = false, ?int $max_pagination_links = null, ?array $_selectors = null, string $hash = '', $keyset_value = null) : object
* Get the Tempcode for pagination.
*
* @param Tempcode $title The title/name of the resource we are browsing through
* @param integer $start The current position in the browser
* @param ID_TEXT $start_name The parameter name used to store our position in the results (usually, 'start')
* @param integer $max The maximum number of rows to show per browser page
* @param ID_TEXT $max_name The parameter name used to store the total number of results to show per-page (usually, 'max')
* @param integer $max_rows The maximum number of rows in the entire dataset
* @param boolean $keep_post Whether to keep POST data when browsing through and relay it as GET
* @param ?integer $max_pagination_links The maximum number of quick-jump pagination-links to show (null: configured default)
* @param ?array $_selectors List of per-page selectors to show (null: show hard-coded ones)
* @param ID_TEXT $hash Hash component to URL
* @param ?mixed $keyset_value Keyset-pagination reference value for the 'next' page of results (null: no keyset pagination)
* @return Tempcode The pagination
*/
function pagination(object $title, int $start, string $start_name, int $max, string $max_name, int $max_rows, bool $keep_post = false, ?int $max_pagination_links = null, ?array $_selectors = null, string $hash = '', $keyset_value = null) : object

