1 | <?php |
||
17 | class UIPagination extends \Asymptix\ui\UIControl { |
||
18 | /** |
||
19 | * Default dialog panel HTML template. |
||
20 | */ |
||
21 | const DEFAULT_TEMPLATE = "vendor/asymptix/framework/core/ui/templates/controls/ui_pagination.tpl.php"; |
||
22 | |||
23 | public $url = ""; |
||
24 | |||
25 | public $pagesNumber; |
||
26 | public $firstPage; |
||
27 | public $previousPage; |
||
28 | public $currentPage; |
||
29 | public $nextPage; |
||
30 | public $lastPage; |
||
31 | public $pagesOffset; |
||
32 | |||
33 | /** |
||
34 | * Display Pagination control. |
||
35 | * |
||
36 | * @param string $url Basic URL of the pagination links (common part). |
||
37 | * @param int $pagesNumber Total pages number. |
||
38 | * @param int $currentPage Current page number. |
||
39 | * @param int $pagesOffset Number of visible pagination links before and |
||
40 | * after current page link. |
||
41 | * @param string $template Path to the pagination HTML template. |
||
42 | */ |
||
43 | public function __construct($url = "", $pagesNumber = 1, $currentPage = 1, $pagesOffset = 3, $template = "") { |
||
59 | |||
60 | public function show() { |
||
65 | |||
66 | private function correctPages() { |
||
72 | |||
73 | public function setCurrentPage($currentPage) { |
||
84 | |||
85 | public static function getCurrentPageNumber($page, $totalPages) { |
||
99 | |||
100 | } |
||
101 |