ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Pagination.php
Go to the documentation of this file.
1<?php
2
19declare(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}
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:29
A component is the most general form of an entity in the UI.
Definition: Component.php:28
Interface to be extended by components that have the possibility to bind to Javascript.
This describes a Pagination Control.
Definition: Pagination.php:33
getDropdownAt()
Below this value, the options are directly rendered as shy-buttons, on and above this value a dropdow...
getNumberOfPages()
Calculate the total number of pages.
withTotalEntries(int $total)
Initialize with the total amount of entries of the controlled data-list.
withPageSize(int $size)
Set the amount of entries per page.
getPageSize()
Get the number of entries per page.
withTargetURL(string $url, string $parameter_name)
Get a Pagination with this target-url.
getDefaultDropdownLabel()
Get the default label (for comparison, mainly) - the default label will be translated,...
withMaxPaginationButtons(int $amount)
Layout; define, how many page-options are shown (max).
withCurrentPage(int $page)
Set the selected page.
withDropdownLabel(string $template)
Layout; set the label for dropdown.
withDropdownAt(int $amount)
Layout; when number of page-entries reaches $amount, the options will be rendered as dropdown.
getTargetURL()
Get the url this instance should trigger.
getMaxPaginationButtons()
Get the maximum amount of page-entries (not records per page!) to be shown.
getParameterName()
Get the parameter this instance uses.
withOnSelect(Signal $signal)
Register a signal with the control.
getDropdownLabel()
Get the template for the label of the dropdown.
getCurrentPage()
Get the currently selected page.
getRange()
Get the current number of entries on this page.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
$url
Definition: shib_logout.php:68