@@ -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(); |
@@ -39,6 +39,9 @@ |
||
| 39 | 39 | ]; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param integer $navId |
|
| 44 | + */ |
|
| 42 | 45 | public static function findContent($navId) |
| 43 | 46 | { |
| 44 | 47 | $lang = Yii::$app->composition->getKey('langShortCode'); |
@@ -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 = ''; |
@@ -46,6 +46,9 @@ |
||
| 46 | 46 | return $model->getErrors(); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | + /** |
|
| 50 | + * @param string $message |
|
| 51 | + */ |
|
| 49 | 52 | public function slack($message, $room) |
| 50 | 53 | { |
| 51 | 54 | $ch = curl_init('https://slack.com/api/chat.postMessage'); |
@@ -46,6 +46,9 @@ |
||
| 46 | 46 | return $model->getErrors(); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | + /** |
|
| 50 | + * @param string $message |
|
| 51 | + */ |
|
| 49 | 52 | public function slack($message, $room) |
| 50 | 53 | { |
| 51 | 54 | $ch = curl_init('https://slack.com/api/chat.postMessage'); |