1 | <?php |
||
27 | class Paginator extends \Nette\Utils\Paginator |
||
28 | 1 | { |
|
29 | const DEFAULT_STEP_COUNT = 4; |
||
30 | const DEFAULT_STEP_RANGE = 3; |
||
31 | |||
32 | /** @var int */ |
||
33 | protected $page; |
||
34 | |||
35 | /** @var array */ |
||
36 | protected $steps = []; |
||
37 | |||
38 | /** @var int */ |
||
39 | protected $countBegin; |
||
40 | |||
41 | /** @var int */ |
||
42 | protected $countEnd; |
||
43 | |||
44 | /** @var \Grido\Grid */ |
||
45 | protected $grid; |
||
46 | |||
47 | /** @var int */ |
||
48 | private $stepCount = self::DEFAULT_STEP_COUNT; |
||
49 | |||
50 | /** @var int */ |
||
51 | private $stepRange = self::DEFAULT_STEP_RANGE; |
||
52 | |||
53 | /** |
||
54 | * @param \Grido\Grid $grid |
||
55 | * @return Paginator |
||
56 | */ |
||
57 | public function setGrid(\Grido\Grid $grid) |
||
62 | |||
63 | /** |
||
64 | * @param int $stepRange |
||
65 | * @return Paginator |
||
66 | */ |
||
67 | public function setStepRange($stepRange) |
||
72 | |||
73 | /** |
||
74 | * @param int $stepCount |
||
75 | * @return Paginator |
||
76 | */ |
||
77 | public function setStepCount($stepCount) |
||
82 | |||
83 | /**********************************************************************************************/ |
||
84 | |||
85 | /** |
||
86 | * @return int |
||
87 | */ |
||
88 | public function getPage() |
||
96 | |||
97 | /** |
||
98 | * @return array |
||
99 | */ |
||
100 | public function getSteps() |
||
120 | |||
121 | /** |
||
122 | * @return int |
||
123 | */ |
||
124 | public function getCountBegin() |
||
132 | |||
133 | /** |
||
134 | * @return int |
||
135 | */ |
||
136 | public function getCountEnd() |
||
146 | } |
||
147 |