@@ -61,6 +61,11 @@ discard block |
||
61 | 61 | ]; |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param string $type |
|
66 | + * @param string $varName |
|
67 | + * @param string $func |
|
68 | + */ |
|
64 | 69 | private function getExtraVarDef($type, $varName, $func) |
65 | 70 | { |
66 | 71 | $info = [ |
@@ -77,6 +82,9 @@ discard block |
||
77 | 82 | return false; |
78 | 83 | } |
79 | 84 | |
85 | + /** |
|
86 | + * @param string $type |
|
87 | + */ |
|
80 | 88 | private function getVariableTypeOption($type) |
81 | 89 | { |
82 | 90 | $types = $this->getVariableTypesOptions(); |
@@ -84,6 +92,9 @@ discard block |
||
84 | 92 | return $types[$type]; |
85 | 93 | } |
86 | 94 | |
95 | + /** |
|
96 | + * @param string $type |
|
97 | + */ |
|
87 | 98 | private function hasVariableTypeOption($type) |
88 | 99 | { |
89 | 100 | return array_key_exists($type, $this->getVariableTypesOptions()); |
@@ -92,7 +103,7 @@ discard block |
||
92 | 103 | /** |
93 | 104 | * Wizzard to create a new CMS block. |
94 | 105 | * |
95 | - * @return number |
|
106 | + * @return integer |
|
96 | 107 | */ |
97 | 108 | public function actionCreate() |
98 | 109 | { |
@@ -302,6 +313,9 @@ discard block |
||
302 | 313 | return $this->outputError("Error while creating file '$file'"); |
303 | 314 | } |
304 | 315 | |
316 | + /** |
|
317 | + * @param string $prefix |
|
318 | + */ |
|
305 | 319 | private function placeholderCreator($prefix) |
306 | 320 | { |
307 | 321 | $this->output(PHP_EOL.'-> Create new '.$prefix, Console::FG_YELLOW); |
@@ -320,8 +334,8 @@ discard block |
||
320 | 334 | |
321 | 335 | /** |
322 | 336 | * |
323 | - * @param unknown $prefix |
|
324 | - * @param string $type 'var', 'cfg' |
|
337 | + * @param string $prefix |
|
338 | + * @param string $typeCast |
|
325 | 339 | * @return multitype:string Ambigous <string, array> |
326 | 340 | */ |
327 | 341 | private function varCreator($prefix, $typeCast) |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | private function getExtraVarDef($type, $varName, $func) |
65 | 65 | { |
66 | 66 | $info = [ |
67 | - 'image-upload' => function ($varName) use ($func) { return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
68 | - 'image-array-upload' => function ($varName) use ($func) { return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
69 | - 'file-upload' => function ($varName) use ($func) { return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
70 | - 'file-array-upload' => function ($varName) use ($func) { return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
71 | - 'cms-page' => function ($varName) use ($func) { return 'Yii::$app->menu->findOne([\'nav_id\' => $this->'.$func.'(\''.$varName.'\', 0)]),'; }, |
|
67 | + 'image-upload' => function($varName) use ($func) { return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
68 | + 'image-array-upload' => function($varName) use ($func) { return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
69 | + 'file-upload' => function($varName) use ($func) { return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
70 | + 'file-array-upload' => function($varName) use ($func) { return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
71 | + 'cms-page' => function($varName) use ($func) { return 'Yii::$app->menu->findOne([\'nav_id\' => $this->'.$func.'(\''.$varName.'\', 0)]),'; }, |
|
72 | 72 | ]; |
73 | 73 | |
74 | 74 | if (array_key_exists($type, $info)) { |
@@ -186,15 +186,15 @@ discard block |
||
186 | 186 | $content .= ' * @var bool Choose whether block is a layout/container/segmnet/section block or not, Container elements will be optically displayed'.PHP_EOL; |
187 | 187 | $content .= ' * in a different way for a better user experience. Container block will not display isDirty colorizing.'.PHP_EOL; |
188 | 188 | $content .= ' */'.PHP_EOL; |
189 | - $content .= ' public $isContainer = false;'.PHP_EOL . PHP_EOL; |
|
189 | + $content .= ' public $isContainer = false;'.PHP_EOL.PHP_EOL; |
|
190 | 190 | $content .= ' /**'.PHP_EOL; |
191 | 191 | $content .= ' * @var bool Choose whether a block can be cached trough the caching component. Be carefull with caching container blocks.'.PHP_EOL; |
192 | 192 | $content .= ' */'.PHP_EOL; |
193 | - $content .= ' public $cacheEnabled = false;'.PHP_EOL . PHP_EOL; |
|
193 | + $content .= ' public $cacheEnabled = false;'.PHP_EOL.PHP_EOL; |
|
194 | 194 | $content .= ' /**'.PHP_EOL; |
195 | 195 | $content .= ' * @var int The cache lifetime for this block in seconds (3600 = 1 hour), only affects when cacheEnabled is true'.PHP_EOL; |
196 | 196 | $content .= ' */'.PHP_EOL; |
197 | - $content .= ' public $cacheExpiration = 3600;'.PHP_EOL . PHP_EOL; |
|
197 | + $content .= ' public $cacheExpiration = 3600;'.PHP_EOL.PHP_EOL; |
|
198 | 198 | |
199 | 199 | // method name |
200 | 200 | $content .= ' public function name()'.PHP_EOL; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | /** |
17 | 17 | * Create a new frontend/admin module. |
18 | 18 | * |
19 | - * @return number |
|
19 | + * @return integer |
|
20 | 20 | */ |
21 | 21 | public function actionCreate() |
22 | 22 | { |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * NgRest Model created at <?= date("d.m.Y H:i"); ?> on LUYA Version <?= $luyaVersion; ?>. |
24 | 24 | * |
25 | -<?php foreach ($properties as $name => $type): ?> * @property <?= $type; ?> $<?= $name . PHP_EOL; ?> |
|
26 | -<?php endforeach;?> |
|
25 | +<?php foreach ($properties as $name => $type): ?> * @property <?= $type; ?> $<?= $name.PHP_EOL; ?> |
|
26 | +<?php endforeach; ?> |
|
27 | 27 | */ |
28 | 28 | <?php if (!$extended): ?>abstract <?php endif; ?>class <?= $className; ?> extends \admin\ngrest\base\Model |
29 | 29 | { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | return [ |
99 | 99 | <?php foreach ($fieldConfigs as $name => $type): ?> |
100 | - '<?=$name; ?>' => '<?= $type;?>', |
|
100 | + '<?=$name; ?>' => '<?= $type; ?>', |
|
101 | 101 | <?php endforeach; ?>]; |
102 | 102 | } |
103 | 103 |