ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Pagination.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 
33 {
34  public const DEFAULT_DROPDOWN_LABEL = 'pagination_label_x_of_y';
35 
41  public function withTargetURL(string $url, string $parameter_name): Pagination;
42 
46  public function getTargetURL(): ?string;
47 
51  public function getParameterName(): string;
52 
57  public function withTotalEntries(int $total): Pagination;
58 
62  public function withPageSize(int $size): Pagination;
63 
67  public function getPageSize(): int;
68 
72  public function withCurrentPage(int $page): Pagination;
73 
77  public function getCurrentPage(): int;
78 
82  public function withOnSelect(Signal $signal): Pagination;
83 
87  public function getNumberOfPages(): int;
88 
92  public function withMaxPaginationButtons(int $amount): Pagination;
93 
98  public function getMaxPaginationButtons(): ?int;
99 
104  public function withDropdownAt(int $amount): Pagination;
105 
110  public function getDropdownAt(): ?int;
111 
119  public function withDropdownLabel(string $template): Pagination;
120 
124  public function getDropdownLabel(): string;
125 
130  public function getDefaultDropdownLabel(): string;
131 
135  public function getRange(): ?Range;
136 }
getDropdownAt()
Below this value, the options are directly rendered as shy-buttons, on and above this value a dropdow...
withCurrentPage(int $page)
Set the selected page.
getRange()
Get the current number of entries on this page.
withMaxPaginationButtons(int $amount)
Layout; define, how many page-options are shown (max).
withTotalEntries(int $total)
Initialize with the total amount of entries of the controlled data-list.
getMaxPaginationButtons()
Get the maximum amount of page-entries (not records per page!) to be shown.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTargetURL()
Get the url this instance should trigger.
withPageSize(int $size)
Set the amount of entries per page.
getCurrentPage()
Get the currently selected page.
$url
Definition: shib_logout.php:66
getPageSize()
Get the number of entries per page.
withDropdownAt(int $amount)
Layout; when number of page-entries reaches $amount, the options will be rendered as dropdown...
getDefaultDropdownLabel()
Get the default label (for comparison, mainly) - the default label will be translated, a custom label will not.
This describes a Pagination Control.
Definition: Pagination.php:32
getNumberOfPages()
Calculate the total number of pages.
withTargetURL(string $url, string $parameter_name)
Get a Pagination with this target-url.
getDropdownLabel()
Get the template for the label of the dropdown.
withOnSelect(Signal $signal)
Register a signal with the control.
getParameterName()
Get the parameter this instance uses.
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:28
withDropdownLabel(string $template)
Layout; set the label for dropdown.