1 | <?php |
||
19 | class Module extends \yii\base\Module |
||
20 | { |
||
21 | /** @var array|StorageInterface */ |
||
22 | protected $_storage; |
||
23 | |||
24 | /** @var int */ |
||
25 | private $pageSize; |
||
26 | |||
27 | const DEFAULT_PAGE_SIZE = 5; |
||
28 | |||
29 | public static function getInstance(): Module |
||
33 | |||
34 | /** |
||
35 | * This to use standard app pathes for views and layouts. |
||
36 | * @return string |
||
37 | */ |
||
38 | public function getViewPath() |
||
42 | |||
43 | /** |
||
44 | * @param string $pageName |
||
45 | * @return AbstractPage|null |
||
46 | * @throws \yii\base\InvalidConfigException |
||
47 | */ |
||
48 | public function find(string $pageName): ?PageInterface |
||
54 | |||
55 | /** |
||
56 | * @param string|null $id |
||
57 | * @return PagesList|null |
||
58 | * @throws \yii\base\InvalidConfigException |
||
59 | */ |
||
60 | public function findList(string $id = null): ?PagesList |
||
66 | |||
67 | /** |
||
68 | * @param array $storageConfig |
||
69 | */ |
||
70 | public function setStorage($storageConfig): void |
||
74 | |||
75 | /** |
||
76 | * @return StorageInterface |
||
77 | * @throws \yii\base\InvalidConfigException |
||
78 | */ |
||
79 | public function getStorage(): StorageInterface |
||
87 | |||
88 | /** |
||
89 | * @param int $pageSize |
||
90 | */ |
||
91 | public function setPageSize(int $pageSize): void |
||
95 | |||
96 | /** |
||
97 | * @return int |
||
98 | */ |
||
99 | public function getPageSize(): int |
||
103 | } |
||
104 |