ILIAS  release_7 Revision v7.30-3-g800a261c036
Pagination.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2017 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3
5
6use \ILIAS\UI\Component as C;
10
15{
16 public const DEFAULT_DROPDOWN_LABEL = 'pagination_label_x_of_y';
17
24 public function withTargetURL(string $url, string $parameter_name) : Pagination;
25
31 public function getTargetURL();
32
36 public function getParameterName() : string;
37
42 public function withTotalEntries(int $total) : Pagination;
43
47 public function withPageSize(int $size) : Pagination;
48
52 public function getPageSize() : int;
53
57 public function withCurrentPage(int $page) : Pagination;
58
62 public function getCurrentPage() : int;
63
67 public function withOnSelect(C\Signal $signal) : Pagination;
68
72 public function getNumberOfPages() : int;
73
77 public function withMaxPaginationButtons(int $amount) : Pagination;
78
85 public function getMaxPaginationButtons();
86
91 public function withDropdownAt(int $amount) : Pagination;
92
99 public function getDropdownAt();
100
108 public function withDropdownLabel(string $template) : Pagination;
109
113 public function getDropdownLabel() : string;
114
119 public function getDefaultDropdownLabel() : string;
120
124 public function getRange() : Range;
125}
$size
Definition: RandomTest.php:84
$total
Definition: Utf8Test.php:87
An exception for terminatinating execution or to throw for unit testing.
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:11
A component is the most general form of an entity in the UI.
Definition: Component.php:14
Interface to be extended by components that have the possibility to bind to Javascript.
This describes a Pagination Control.
Definition: Pagination.php:15
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.
withOnSelect(C\Signal $signal)
Register a signal with the control.
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.
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