@@ -155,8 +155,6 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
158 | - * @param string|array $with can be a string containg "hidden" or an array with multiple patters |
|
159 | - * for example `['hidden']`. Further with statements upcoming. |
|
160 | 158 | * @return \cms\menu\Query |
161 | 159 | */ |
162 | 160 | public function with($types) |
@@ -239,7 +237,7 @@ discard block |
||
239 | 237 | * Retrieve all found rows based on the filtering options and returns the the QueryIterator object |
240 | 238 | * which is represents an array. |
241 | 239 | * |
242 | - * @return \cms\menu\QueryIterator Returns the QueryIterator object. |
|
240 | + * @return QueryIteratorFilter Returns the QueryIterator object. |
|
243 | 241 | */ |
244 | 242 | public function all() |
245 | 243 | { |
@@ -262,7 +260,7 @@ discard block |
||
262 | 260 | * |
263 | 261 | * @param array $data The filtere results where the iterator object should be created with |
264 | 262 | * @param string $langContext The language short code context, if any. |
265 | - * @return \cms\menu\QueryIterator |
|
263 | + * @return QueryIteratorFilter |
|
266 | 264 | */ |
267 | 265 | public static function createArrayIterator(array $data, $langContext) |
268 | 266 | { |
@@ -284,7 +284,7 @@ |
||
284 | 284 | |
285 | 285 | protected function filter(array $whereExpression, $containerData) |
286 | 286 | { |
287 | - $data = array_filter($containerData, function ($item) { |
|
287 | + $data = array_filter($containerData, function($item) { |
|
288 | 288 | foreach ($item as $field => $value) { |
289 | 289 | if (!$this->arrayFilter($value, $field)) { |
290 | 290 | return false; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use yii\db\Query; |
6 | 6 | use luya\helpers\ArrayHelper; |
7 | -use cmsadmin\models\NavContainer; |
|
8 | 7 | use admin\models\Lang; |
9 | 8 | |
10 | 9 | class MenuController extends \admin\base\RestController |
@@ -19,6 +19,9 @@ discard block |
||
19 | 19 | */ |
20 | 20 | class NavController extends \admin\base\RestController |
21 | 21 | { |
22 | + /** |
|
23 | + * @param string $name |
|
24 | + */ |
|
22 | 25 | private function postArg($name) |
23 | 26 | { |
24 | 27 | return Yii::$app->request->post($name, null); |
@@ -170,7 +173,6 @@ discard block |
||
170 | 173 | /** |
171 | 174 | * creates a new nav entry for the type page (nav_id will be created. |
172 | 175 | * |
173 | - * @param array $_POST: |
|
174 | 176 | */ |
175 | 177 | public function actionCreatePage() |
176 | 178 | { |
@@ -91,7 +91,7 @@ |
||
91 | 91 | * ] |
92 | 92 | * ``` |
93 | 93 | * |
94 | - * @param int $node parent_nav_id value |
|
94 | + * @param integer $parentNavId |
|
95 | 95 | */ |
96 | 96 | private function getFromParentNode($parentNavId) |
97 | 97 | { |
@@ -71,6 +71,9 @@ |
||
71 | 71 | parent::afterDelete(); |
72 | 72 | } |
73 | 73 | |
74 | + /** |
|
75 | + * @param string $context |
|
76 | + */ |
|
74 | 77 | public static function objectId($blockId, $id, $context, $pageObject = null) |
75 | 78 | { |
76 | 79 | $block = self::find()->where(['id' => $blockId])->asArray()->one(); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @todo fix me above! |
185 | 185 | * |
186 | - * @param unknown $moduleName |
|
186 | + * @param string $moduleName |
|
187 | 187 | */ |
188 | 188 | public static function fromModule($moduleName) |
189 | 189 | { |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | /** |
236 | 236 | * @todo use AR or queryCommand? NavItem::find()->leftJoin('cms_nav_item_module', 'nav_item_type_id=cms_nav_item_module.id')->where(['nav_item_type' => 2, 'cms_nav_item_module.module_name' => $moduleName])->asArray()->one() |
237 | 237 | * |
238 | - * @param unknown $moduleName |
|
238 | + * @param string $moduleName |
|
239 | 239 | * |
240 | 240 | * @return unknown |
241 | 241 | */ |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * |
267 | 267 | * Copy content of type cms_nav_item_page to a target nav item. This will create a new entry in cms_nav_item_page and for every used block a new entry in cms_nav_item_page_block_item |
268 | 268 | * |
269 | - * @param $targetNavItem nav item object |
|
269 | + * @param \yii\db\ActiveRecord $targetNavItem nav item object |
|
270 | 270 | * @return bool |
271 | 271 | */ |
272 | 272 | public function copyPageItem($targetNavItem) |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * |
321 | 321 | * Copy content of type cms_nav_item_module to a target nav item. This will create a new entry in cms_nav_item_module. |
322 | 322 | * |
323 | - * @param $targetNavItem |
|
323 | + * @param \yii\db\ActiveRecord $targetNavItem |
|
324 | 324 | * @return bool |
325 | 325 | */ |
326 | 326 | public function copyModuleItem($targetNavItem) |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | * |
349 | 349 | * Copy content of type cms_nav_item_redirect to a target nav item. This will create a new entry in cms_nav_item_redirect. |
350 | 350 | * |
351 | - * @param $targetNavItem |
|
351 | + * @param \yii\db\ActiveRecord $targetNavItem |
|
352 | 352 | * @return bool |
353 | 353 | */ |
354 | 354 | public function copyRedirectItem($targetNavItem) |
@@ -20,6 +20,9 @@ |
||
20 | 20 | |
21 | 21 | private $_module = null; |
22 | 22 | |
23 | + /** |
|
24 | + * @return \luya\base\Module |
|
25 | + */ |
|
23 | 26 | private function getModule() |
24 | 27 | { |
25 | 28 | if ($this->_module !== null) { |
@@ -79,6 +79,9 @@ discard block |
||
79 | 79 | throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '". $this->id . "'. Make sure your page does not have an old inactive/deleted cms layout selected."); |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param string $key |
|
84 | + */ |
|
82 | 85 | private function setHasCache($key, $value, $expirationTime) |
83 | 86 | { |
84 | 87 | if (Yii::$app->has('cache')) { |
@@ -86,6 +89,9 @@ discard block |
||
86 | 89 | } |
87 | 90 | } |
88 | 91 | |
92 | + /** |
|
93 | + * @param string $key |
|
94 | + */ |
|
89 | 95 | private function getHasCache($key) |
90 | 96 | { |
91 | 97 | if (Yii::$app->has('cache')) { |
@@ -98,6 +104,9 @@ discard block |
||
98 | 104 | return false; |
99 | 105 | } |
100 | 106 | |
107 | + /** |
|
108 | + * @param integer $prevId |
|
109 | + */ |
|
101 | 110 | public function renderPlaceholder($navItemPageId, $placeholderVar, $prevId) |
102 | 111 | { |
103 | 112 | $string = ''; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | return $data; |
77 | 77 | } |
78 | 78 | |
79 | - throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '". $this->id . "'. Make sure your page does not have an old inactive/deleted cms layout selected."); |
|
79 | + throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '".$this->id."'. Make sure your page does not have an old inactive/deleted cms layout selected."); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | private function setHasCache($key, $value, $expirationTime) |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | } |
146 | 146 | |
147 | - $string.= $blockResponse; |
|
147 | + $string .= $blockResponse; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | return $string; |
@@ -85,6 +85,9 @@ |
||
85 | 85 | ], |
86 | 86 | ]; |
87 | 87 | |
88 | + /** |
|
89 | + * @param string $message |
|
90 | + */ |
|
88 | 91 | public static function t($message, array $params = []) |
89 | 92 | { |
90 | 93 | return Yii::t('cmsadmin', $message, $params, Yii::$app->luyaLanguage); |