jaxon-php /
jaxon-mono
| 1 | <?php |
||
| 2 | |||
| 3 | use Jaxon\App\PageComponent; |
||
| 4 | |||
| 5 | class PageContent extends PageComponent |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @inheritDoc |
||
| 9 | */ |
||
| 10 | protected function limit(): int |
||
| 11 | { |
||
| 12 | return 10; |
||
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @inheritDoc |
||
| 17 | */ |
||
| 18 | protected function count(): int |
||
| 19 | { |
||
| 20 | return 150; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function html(): string |
||
| 24 | { |
||
| 25 | return 'Showing page number ' . $this->currentPage(); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function showPage(int $pageNumber) |
||
| 29 | { |
||
| 30 | // Get the paginator. This will also set the final page number value. |
||
| 31 | $paginator = $this->paginator($pageNumber); |
||
| 32 | // Render the page content. |
||
| 33 | $this->render(); |
||
| 34 | // Render the pagination component. |
||
| 35 | $paginator->render($this->rq()->showPage()); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 36 | } |
||
| 37 | } |
||
| 38 | |||
| 39 | jaxon()->app()->setup(configFile('component.php')); |
||
| 40 |