class pagination
Methods
__construct(template $template, user $user, helper $helper, dispatcher_interface $phpbb_dispatcher)
Constructor |
||
null |
generate_template_pagination(string $base_url, string $block_var_name, string $start_name, int $num_items, int $per_page, int $start = 1, bool $reverse_count = false, bool $ignore_on_page = false)
Generate template rendered pagination Allows full control of rendering of pagination with the template |
|
int |
get_on_page(int $per_page, int $start)
Get current page number |
|
string |
on_page(int $num_items, int $per_page, int $start)
Return current page |
|
int |
validate_start(int $start, int $per_page, int $num_items)
Get current page number |
|
int |
reverse_start(int $start, int $limit, int $num_items)
Get new start when searching from the end |
|
int |
reverse_limit(int $start, int $per_page, int $num_items)
Get new item limit when searching from the end |
Details
at line 38
public
__construct(template $template, user $user, helper $helper, dispatcher_interface $phpbb_dispatcher)
Constructor
at line 137
public null
generate_template_pagination(string $base_url, string $block_var_name, string $start_name, int $num_items, int $per_page, int $start = 1, bool $reverse_count = false, bool $ignore_on_page = false)
Generate template rendered pagination Allows full control of rendering of pagination with the template
at line 290
public int
get_on_page(int $per_page, int $start)
Get current page number
at line 303
public string
on_page(int $num_items, int $per_page, int $start)
Return current page
at line 317
public int
validate_start(int $start, int $per_page, int $num_items)
Get current page number
at line 337
public int
reverse_start(int $start, int $limit, int $num_items)
Get new start when searching from the end
If the user is trying to reach late pages, start searching from the end.
at line 353
public int
reverse_limit(int $start, int $per_page, int $num_items)
Get new item limit when searching from the end
If the user is trying to reach late pages, start searching from the end. In this case the items to display might be lower then the actual per_page setting.