ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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;
9
14{
15 const DEFAULT_DROPDOWN_LABEL = 'pagination_label_x_of_y';
16
23 public function withTargetURL(string $url, string $parameter_name) : Pagination;
24
30 public function getTargetURL();
31
35 public function getParameterName() : string;
36
41 public function withTotalEntries(int $total) : Pagination;
42
46 public function withPageSize(int $size) : Pagination;
47
51 public function getPageSize() : int;
52
56 public function withCurrentPage(int $page) : Pagination;
57
61 public function getCurrentPage() : int;
62
66 public function getOffset() : int;
67
71 public function withOnSelect(C\Signal $signal) : Pagination;
72
76 public function getNumberOfPages() : int;
77
81 public function withMaxPaginationButtons(int $amount) : Pagination;
82
89 public function getMaxPaginationButtons();
90
95 public function withDropdownAt(int $amount) : Pagination;
96
103 public function getDropdownAt();
104
112 public function withDropdownLabel(string $template) : Pagination;
113
117 public function getDropdownLabel() : string;
118
123 public function getDefaultDropdownLabel() : string;
124
128 public function getPageLength() : int;
129}
$size
Definition: RandomTest.php:84
$total
Definition: Utf8Test.php:87
An exception for terminatinating execution or to throw for unit testing.
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:14
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 numebr of entries per page.
withOnSelect(C\Signal $signal)
Register a signal with the control.
getOffset()
Get the data's offset according to current page and page size.
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.
getPageLength()
Get the current number of entries on this page.
getDropdownLabel()
Get the template for the label of the dropdown.
getCurrentPage()
Get the currently slected page.
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
$url