Conditions | 2 |
Paths | 2 |
Total Lines | 30 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
9 | public function generate() |
||
10 | { |
||
11 | $viewsToBeGenerated = ['index']; // To be generated dynamically |
||
12 | |||
13 | $generatedFiles = []; |
||
14 | |||
15 | foreach ($viewsToBeGenerated as $view) { |
||
16 | $viewTemplate = $this->buildTemplate('Backend/Views/' . $view, [ |
||
17 | '{{headings}}' => $this->getHeadings(), |
||
18 | '{{modelNameLowercase}}' => str_singular($this->module->getModuleName()), |
||
|
|||
19 | '{{moduleName}}' => $this->module->getModuleName() |
||
20 | ]); |
||
21 | |||
22 | $fullFilePath = $this->getPath("resources/views/backend/" . $this->module->getModuleName()) . "/{$view}.blade.php"; |
||
23 | file_put_contents($fullFilePath, $viewTemplate); |
||
24 | $generatedFiles[] = $fullFilePath; |
||
25 | } |
||
26 | |||
27 | $mainMenuFile = $this->getPath("resources/views/backend/includes/")."main_menu.blade.php"; |
||
28 | $this->initializeFiles([ |
||
29 | $mainMenuFile => "Backend/Views/includes/main_menu", |
||
30 | ]); |
||
31 | |||
32 | $this->insertIntoFile( |
||
33 | $mainMenuFile, |
||
34 | "{{-- Main Menu --}}", |
||
35 | "" |
||
36 | ); |
||
37 | |||
38 | return $generatedFiles; |
||
39 | } |
||
50 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.