[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch

title

Body

[close]

/phpbb/ -> pagination.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 357 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

pagination:: (8 methods):
  __construct()
  generate_page_link()
  generate_template_pagination()
  get_on_page()
  on_page()
  validate_start()
  reverse_start()
  reverse_limit()


Class: pagination  - X-Ref

__construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher)   X-Ref
Constructor

param: \phpbb\template\template            $template
param: \phpbb\user                            $user
param: \phpbb\controller\helper            $helper
param: \phpbb\event\dispatcher_interface    $phpbb_dispatcher

generate_page_link($base_url, $on_page, $start_name, $per_page)   X-Ref
Generate a pagination link based on the url and the page information

return: string URL for the requested page
param: string $base_url is url prepended to all links generated within the function
param: string $on_page is the page for which we want to generate the link
param: string $start_name is the name of the parameter containing the first item of the given page (example: start=20)
param: int $per_page the number of items, posts, etc. to display per page, used to determine the number of pages to produce

generate_template_pagination($base_url, $block_var_name, $start_name, $num_items, $per_page, $start = 1, $reverse_count = false, $ignore_on_page = false)   X-Ref
Generate template rendered pagination
Allows full control of rendering of pagination with the template

return: null
param: string $base_url is url prepended to all links generated within the function
param: string $block_var_name is the name assigned to the pagination data block within the template (example: <!-- BEGIN pagination -->)
param: string $start_name is the name of the parameter containing the first item of the given page (example: start=20)
param: int $num_items the total number of items, posts, etc., used to determine the number of pages to produce
param: int $per_page the number of items, posts, etc. to display per page, used to determine the number of pages to produce
param: int $start the item which should be considered currently active, used to determine the page we're on
param: bool $reverse_count determines whether we weight display of the list towards the start (false) or end (true) of the list
param: bool $ignore_on_page decides whether we enable an active (unlinked) item, used primarily for embedded lists

get_on_page($per_page, $start)   X-Ref
Get current page number

return: int    Current page number
param: int $per_page the number of items, posts, etc. per page
param: int $start the item which should be considered currently active, used to determine the page we're on

on_page($num_items, $per_page, $start)   X-Ref
Return current page

return: string Descriptive pagination string (e.g. "page 1 of 10")
param: int $num_items the total number of items, posts, topics, etc.
param: int $per_page the number of items, posts, etc. per page
param: int $start the item which should be considered currently active, used to determine the page we're on

validate_start($start, $per_page, $num_items)   X-Ref
Get current page number

return: int    Current page number
param: int $start the item which should be considered currently active, used to determine the page we're on
param: int $per_page the number of items, posts, etc. per page
param: int $num_items the total number of items, posts, topics, etc.

reverse_start($start, $limit, $num_items)   X-Ref
Get new start when searching from the end

If the user is trying to reach late pages, start searching from the end.

return: int    Current page number
param: int $start the item which should be considered currently active, used to determine the page we're on
param: int $limit the number of items, posts, etc. to display
param: int $num_items the total number of items, posts, topics, etc.

reverse_limit($start, $per_page, $num_items)   X-Ref
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.

return: int    Current page number
param: int $start the item which should be considered currently active, used to determine the page we're on
param: int $per_page the number of items, posts, etc. per page
param: int $num_items the total number of items, posts, topics, etc.



Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1