@@ -9,11 +9,17 @@ discard block |
||
9 | 9 | return 'admin_config'; |
10 | 10 | } |
11 | 11 | |
12 | + /** |
|
13 | + * @param string $name |
|
14 | + */ |
|
12 | 15 | public static function has($name) |
13 | 16 | { |
14 | 17 | return (self::find()->where(['name' => $name])->one()) ? true : false; |
15 | 18 | } |
16 | 19 | |
20 | + /** |
|
21 | + * @param string $name |
|
22 | + */ |
|
17 | 23 | public static function get($name) |
18 | 24 | { |
19 | 25 | $model = self::find()->where(['name' => $name])->asArray()->one(); |
@@ -25,6 +31,10 @@ discard block |
||
25 | 31 | return; |
26 | 32 | } |
27 | 33 | |
34 | + /** |
|
35 | + * @param string $name |
|
36 | + * @param integer $value |
|
37 | + */ |
|
28 | 38 | public static function set($name, $value) |
29 | 39 | { |
30 | 40 | $model = self::find()->where(['name' => $name])->one(); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * We can not global set is_deleted=0 to the where condition cause in some parts of the storage we want |
41 | 41 | * to access the name_new_compound to rebuild old image paths. |
42 | 42 | * |
43 | - * @return \yii\db\$this |
|
43 | + * @return \yii\db\ActiveQuery |
|
44 | 44 | */ |
45 | 45 | public static function find() |
46 | 46 | { |
@@ -128,6 +128,9 @@ |
||
128 | 128 | ]; |
129 | 129 | } |
130 | 130 | |
131 | + /** |
|
132 | + * @param string $message |
|
133 | + */ |
|
131 | 134 | public static function t($message, array $params = []) |
132 | 135 | { |
133 | 136 | return Yii::t('admin', $message, $params, Yii::$app->luyaLanguage); |
@@ -45,6 +45,9 @@ discard block |
||
45 | 45 | |
46 | 46 | public $ngRestServiceArray = []; |
47 | 47 | |
48 | + /** |
|
49 | + * @param \admin\ngrest\ConfigBuilder $config |
|
50 | + */ |
|
48 | 51 | abstract public function ngRestConfig($config); |
49 | 52 | |
50 | 53 | abstract public function ngRestApiEndpoint(); |
@@ -292,8 +295,8 @@ discard block |
||
292 | 295 | * |
293 | 296 | * |
294 | 297 | * @param \admin\ngrest\ConfigBuilder $config |
295 | - * @param unknown $type |
|
296 | - * @param array $fields |
|
298 | + * @param string $type |
|
299 | + * @param string[] $fields |
|
297 | 300 | * @throws \yii\base\InvalidConfigException |
298 | 301 | * @since 1.0.0-beta4 |
299 | 302 | */ |
@@ -26,6 +26,9 @@ discard block |
||
26 | 26 | return $this->_model; |
27 | 27 | } |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $type |
|
31 | + */ |
|
29 | 32 | protected function createBaseElement($doc, $type) |
30 | 33 | { |
31 | 34 | $elmn = $doc->createElement($type); |
@@ -47,6 +50,9 @@ discard block |
||
47 | 50 | $this->i18n = $i18n; |
48 | 51 | } |
49 | 52 | |
53 | + /** |
|
54 | + * @param string $name |
|
55 | + */ |
|
50 | 56 | public function getServiceName($name) |
51 | 57 | { |
52 | 58 | return 'service.'.$this->name.'.'.$name; |
@@ -105,11 +105,6 @@ |
||
105 | 105 | * |
106 | 106 | * ``` |
107 | 107 | * |
108 | - * @param string|array $type the object type. This can be specified in one of the following forms: |
|
109 | - * |
|
110 | - * - a string: representing the class name of the object to be created |
|
111 | - * - a configuration array: the array must contain a `class` element which is treated as the object class, |
|
112 | - * and the rest of the name-value pairs will be used to initialize the corresponding object properties |
|
113 | 108 | * |
114 | 109 | * @since 1.0.0-beta4 |
115 | 110 | */ |
@@ -40,6 +40,9 @@ |
||
40 | 40 | return $this->render->render(); |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @return Config |
|
45 | + */ |
|
43 | 46 | public static function findConfig($ngRestConfigHash) |
44 | 47 | { |
45 | 48 | // decode the session, find the hash, if yes return the |
@@ -226,6 +226,12 @@ discard block |
||
226 | 226 | ]; |
227 | 227 | } |
228 | 228 | |
229 | + /** |
|
230 | + * @param string $configContext |
|
231 | + * @param string $elmnId |
|
232 | + * @param string $elmnModel |
|
233 | + * @param boolean $elmni18n |
|
234 | + */ |
|
229 | 235 | private function renderElementPlugins($configContext, $plugins, $elmnId, $elmnName, $elmnModel, $elmnAlias, $elmni18n) |
230 | 236 | { |
231 | 237 | $doc = new DOMDocument('1.0'); |
@@ -247,11 +253,17 @@ discard block |
||
247 | 253 | return $obj->$method($DOMDocument); |
248 | 254 | } |
249 | 255 | |
256 | + /** |
|
257 | + * @param string $configContext |
|
258 | + */ |
|
250 | 259 | private function ngModelString($configContext, $fieldId) |
251 | 260 | { |
252 | 261 | return 'data.'.$configContext.'.'.$fieldId; |
253 | 262 | } |
254 | 263 | |
264 | + /** |
|
265 | + * @param string $configContext |
|
266 | + */ |
|
255 | 267 | private function i18nNgModelString($configContext, $fieldId, $lang) |
256 | 268 | { |
257 | 269 | return 'data.'.$configContext.'.'.$fieldId.'[\''.$lang.'\']'; |
@@ -113,7 +113,6 @@ discard block |
||
113 | 113 | * Class constructor to DI the request object. |
114 | 114 | * |
115 | 115 | * @param \luya\web\Request $request |
116 | - * @param \luya\components\Composition $composition |
|
117 | 116 | * @param array $config |
118 | 117 | */ |
119 | 118 | public function __construct(\luya\web\Request $request, array $config = []) |
@@ -370,7 +369,7 @@ discard block |
||
370 | 369 | * |
371 | 370 | * @see \cms\menu\Query::where() |
372 | 371 | * |
373 | - * @return \cms\menu\QueryIterator |
|
372 | + * @return QueryIteratorFilter |
|
374 | 373 | */ |
375 | 374 | public function findAll(array $where) |
376 | 375 | { |
@@ -448,6 +447,7 @@ discard block |
||
448 | 447 | * prepand the base url for the provided alias. |
449 | 448 | * |
450 | 449 | * @param string $alias |
450 | + * @param string $langShortCode |
|
451 | 451 | * |
452 | 452 | * @return string |
453 | 453 | */ |
@@ -585,7 +585,7 @@ |
||
585 | 585 | public function flushCache() |
586 | 586 | { |
587 | 587 | foreach ($this->getLanguages() as $lang) { |
588 | - $this->deleteHasCache($this->cachePrefix . $lang['short_code']); |
|
588 | + $this->deleteHasCache($this->cachePrefix.$lang['short_code']); |
|
589 | 589 | } |
590 | 590 | } |
591 | 591 | } |