1 | <?php |
||
19 | class Skeleton extends BackendController |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Extractor model instance |
||
24 | * @var \gplcart\modules\skeleton\models\Extractor $extractor |
||
25 | */ |
||
26 | protected $extractor; |
||
27 | |||
28 | /** |
||
29 | * Module generator instance |
||
30 | * @var \gplcart\modules\skeleton\models\Generator $generator |
||
31 | */ |
||
32 | protected $generator; |
||
33 | |||
34 | /** |
||
35 | * Constructor |
||
36 | * @param SkeletonExtractorModel $extractor |
||
37 | * @param SkeletonGeneratorModel $generator |
||
38 | */ |
||
39 | public function __construct(SkeletonExtractorModel $extractor, |
||
47 | |||
48 | /** |
||
49 | * Displays the generate skeleton page |
||
50 | */ |
||
51 | public function editSkeleton() |
||
70 | |||
71 | /** |
||
72 | * Generate a module skeleton after hook extraction |
||
73 | * @return null |
||
74 | */ |
||
75 | protected function generateFromJobSkeleton() |
||
97 | |||
98 | /** |
||
99 | * Handles submitted data |
||
100 | */ |
||
101 | protected function submitSkeleton() |
||
107 | |||
108 | /** |
||
109 | * Validates an array of submitted data |
||
110 | */ |
||
111 | protected function validateSkeleton() |
||
129 | |||
130 | /** |
||
131 | * Creates a skeleton for a module |
||
132 | */ |
||
133 | protected function createSkeleton() |
||
141 | |||
142 | /** |
||
143 | * Generate skeleton files |
||
144 | * @param array $data |
||
145 | */ |
||
146 | protected function generateSkeleton(array $data) |
||
156 | |||
157 | /** |
||
158 | * Output generated skeleton to download |
||
159 | */ |
||
160 | protected function downloadSkeleton() |
||
168 | |||
169 | /** |
||
170 | * Set up hook extraction job |
||
171 | */ |
||
172 | protected function setExtractionJobSkeleton() |
||
188 | |||
189 | /** |
||
190 | * Returns a total number of scanned files to extract hooks from |
||
191 | * @return integer |
||
192 | */ |
||
193 | protected function getTotalExtractSkeleton() |
||
197 | |||
198 | /** |
||
199 | * Set title on the edit module page |
||
200 | */ |
||
201 | protected function setBreadcrumbEditSkeleton() |
||
212 | |||
213 | /** |
||
214 | * Set title on the generate skeleton page |
||
215 | */ |
||
216 | protected function setTitleEditSkeleton() |
||
220 | |||
221 | /** |
||
222 | * Render and output the generate skeleton page |
||
223 | */ |
||
224 | protected function outputEditSkeleton() |
||
228 | |||
229 | } |
||
230 |