@@ -49,13 +49,13 @@ |
||
49 | 49 | } |
50 | 50 | $pages = []; |
51 | 51 | |
52 | - $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . static::PREV_PAGE . ' ' . $this->getPositions()->getFirstPage() : static::NONE_PAGE . static::NONE_PAGE ; |
|
53 | - $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . ' ' . $this->getPositions()->getPrevPage() : static::NONE_PAGE ; |
|
54 | - $pages[] = $this->getPositions()->getPager()->getActualPage() ; |
|
55 | - $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getNextPage() . ' ' . static::NEXT_PAGE : static::NONE_PAGE ; |
|
56 | - $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getLastPage() . ' ' . static::NEXT_PAGE . static::NEXT_PAGE : static::NONE_PAGE . static::NONE_PAGE ; |
|
52 | + $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . static::PREV_PAGE . ' ' . $this->getPositions()->getFirstPage() : static::NONE_PAGE . static::NONE_PAGE; |
|
53 | + $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . ' ' . $this->getPositions()->getPrevPage() : static::NONE_PAGE; |
|
54 | + $pages[] = $this->getPositions()->getPager()->getActualPage(); |
|
55 | + $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getNextPage() . ' ' . static::NEXT_PAGE : static::NONE_PAGE; |
|
56 | + $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getLastPage() . ' ' . static::NEXT_PAGE . static::NEXT_PAGE : static::NONE_PAGE . static::NONE_PAGE; |
|
57 | 57 | |
58 | - return implode(' | ', $pages) . ($showPositions ? ( PHP_EOL . $this->getFilledText($this->getPositions()) ) : '' ); |
|
58 | + return implode(' | ', $pages) . ($showPositions ? (PHP_EOL . $this->getFilledText($this->getPositions())) : ''); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function getPager(): IPager |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $pages[] = $first->reset()->setData($this->link, static::PREV_PAGE)->render(); |
64 | 64 | |
65 | 65 | foreach ($this->getDisplayPages() as $displayPage) { |
66 | - $current = ($this->getPositions()->getPager()->getActualPage() == $displayPage) ? $this->currentPage : $this->anotherPage ; |
|
66 | + $current = ($this->getPositions()->getPager()->getActualPage() == $displayPage) ? $this->currentPage : $this->anotherPage; |
|
67 | 67 | $this->link->setPageNumber($displayPage); |
68 | 68 | $pages[] = $current->reset()->setData($this->link, strval($displayPage))->render(); |
69 | 69 | } |
@@ -17,17 +17,17 @@ |
||
17 | 17 | } |
18 | 18 | $pages = []; |
19 | 19 | |
20 | - $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . static::PREV_PAGE . ' ' . $this->getPositions()->getFirstPage() : static::NONE_PAGE . static::NONE_PAGE ; |
|
21 | - $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . ' ' . $this->getPositions()->getPrevPage() : static::NONE_PAGE ; |
|
20 | + $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . static::PREV_PAGE . ' ' . $this->getPositions()->getFirstPage() : static::NONE_PAGE . static::NONE_PAGE; |
|
21 | + $pages[] = $this->getPositions()->prevPageExists() ? static::PREV_PAGE . ' ' . $this->getPositions()->getPrevPage() : static::NONE_PAGE; |
|
22 | 22 | |
23 | 23 | foreach ($this->getDisplayPages() as $displayPage) { |
24 | 24 | $current = ($this->getPositions()->getPager()->getActualPage() == $displayPage); |
25 | - $pages[] = $current ? static::SELECT_PAGE . $displayPage . static::SELECT_PAGE : $displayPage ; |
|
25 | + $pages[] = $current ? static::SELECT_PAGE . $displayPage . static::SELECT_PAGE : $displayPage; |
|
26 | 26 | } |
27 | 27 | |
28 | - $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getNextPage() . ' ' . static::NEXT_PAGE : static::NONE_PAGE ; |
|
29 | - $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getLastPage() . ' ' . static::NEXT_PAGE . static::NEXT_PAGE : static::NONE_PAGE . static::NONE_PAGE ; |
|
28 | + $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getNextPage() . ' ' . static::NEXT_PAGE : static::NONE_PAGE; |
|
29 | + $pages[] = $this->getPositions()->nextPageExists() ? $this->getPositions()->getLastPage() . ' ' . static::NEXT_PAGE . static::NEXT_PAGE : static::NONE_PAGE . static::NONE_PAGE; |
|
30 | 30 | |
31 | - return implode(' | ', $pages) . ( $showPositions ? (PHP_EOL . $this->getFilledText($this->getPositions()) ) : ''); |
|
31 | + return implode(' | ', $pages) . ($showPositions ? (PHP_EOL . $this->getFilledText($this->getPositions())) : ''); |
|
32 | 32 | } |
33 | 33 | } |