|
static | create ($total, $current_page=0, $per_page=null) |
|
Pagination abstraction
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
- Since
- Stud.IP 4.4
asButtons |
( |
|
$name = 'page' | ) |
|
Renders the paginations with <button> elements.
- Parameters
-
string | $name | Value of the button's name attribute |
- Returns
- string html
asDialog |
( |
|
$content = '' | ) |
|
Add dialog options
- Parameters
-
string | $content | Parameters for data-dialog attribute |
- Returns
- Pagination instance to allow chaining
asLinks |
( |
Closure |
$link_for = null | ) |
|
Renders the paginations with link elements.
- Parameters
-
Closure | $link_for | Optional generator for page links (defaults to links to the current page with ?page= parameters) |
- Returns
- string html
static create |
( |
|
$total, |
|
|
|
$current_page = 0 , |
|
|
|
$per_page = null |
|
) |
| |
|
static |
Creates a pagination object.
- Parameters
-
int | $total | Total number of entries |
int | $current_page | Current page |
int | $per_page | Displayed entries per page |
- Returns
- Pagination object
Returns the current page
- Returns
- int
Returns the current offset or skipped entries before the current page.
- Returns
- int
Get total number of pages.
- Returns
- int
Returns the maximum number of entries per page.
- Returns
- int
Returns the total number of entries.
- Returns
- int
loadSORMCollection |
( |
|
$sorm_class, |
|
|
|
$condition = '1' , |
|
|
array |
$parameters = [] |
|
) |
| |
Loads the slice of a sorm collection defined by this object.
- Parameters
-
string | $sorm_class | Name of the SORM class |
string | $condition | Condition to load objects by |
array | $parameters | Additional parameters for the condition |
- Returns
- SimpleORMapCollection
- Exceptions
-
The documentation for this class was generated from the following file: