1 | <?php |
||
20 | class Install |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * Translation UI model instance |
||
25 | * @var \gplcart\core\models\Translation $translation |
||
26 | */ |
||
27 | protected $translation; |
||
28 | |||
29 | /** |
||
30 | * Module class instance |
||
31 | * @var \gplcart\core\Module $module |
||
32 | */ |
||
33 | protected $module; |
||
34 | |||
35 | /** |
||
36 | * @param Module $module |
||
37 | * @param Translation $translation |
||
38 | */ |
||
39 | public function __construct(Module $module, Translation $translation) |
||
44 | |||
45 | /** |
||
46 | * Returns an array of modules required for Base installation profile |
||
47 | * @return array |
||
48 | */ |
||
49 | public function getRequiredModules() |
||
53 | |||
54 | /** |
||
55 | * Whether the current distribution contains all the required modules |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function hasAllRequiredModules() |
||
66 | |||
67 | /** |
||
68 | * Install all required modules |
||
69 | * @return bool |
||
70 | * @throws RuntimeException |
||
71 | */ |
||
72 | public function installModules() |
||
83 | |||
84 | /** |
||
85 | * Create demo content using Demo module |
||
86 | * @param integer $store_id |
||
87 | * @param string $handler_id |
||
88 | * @return bool|string |
||
89 | */ |
||
90 | public function createDemo($store_id, $handler_id) |
||
94 | |||
95 | /** |
||
96 | * Returns an array of demo handlers |
||
97 | * @return array |
||
98 | */ |
||
99 | public function getDemoHandlers() |
||
103 | |||
104 | /** |
||
105 | * Returns Demo module instance |
||
106 | * @return \gplcart\modules\demo\Main |
||
107 | */ |
||
108 | public function getDemoModule() |
||
114 | |||
115 | /** |
||
116 | * Returns Module model class instance |
||
117 | * @return \gplcart\core\models\Module |
||
118 | */ |
||
119 | protected function getModuleModel() |
||
125 | |||
126 | } |
||
127 |