Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function generate() |
||
28 | { |
||
29 | $templateData = get_artomator_template('interface'); |
||
30 | |||
31 | $templateData = fill_template($this->commandData->dynamicVars, $templateData); |
||
32 | |||
33 | $searchables = []; |
||
34 | |||
35 | foreach ($this->commandData->fields as $field) { |
||
36 | if ($field->isSearchable) { |
||
37 | $searchables[] = "'".$field->name."'"; |
||
38 | } |
||
39 | } |
||
40 | |||
41 | $templateData = str_replace('$FIELDS$', implode(','.infy_nl_tab(1, 2), $searchables), $templateData); |
||
42 | |||
43 | FileUtil::createFile($this->path, $this->fileName, $templateData); |
||
44 | |||
45 | $this->commandData->commandComment("\nRepository Interface created: "); |
||
46 | $this->commandData->commandInfo($this->fileName); |
||
47 | } |
||
56 |