@@ -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'); |
@@ -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 |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | public $displayTemplate = null; |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * @param unknown $model \news\models\Tag::className() |
|
| 30 | - * @param unknown $refJoinTable news_article_tag |
|
| 31 | - * @param unknown $refModelPkId news_article_tag.arictle_id |
|
| 32 | - * @param unknown $refJoinPkId news_article_tag.tag_id |
|
| 33 | - * @param array $displayFields |
|
| 29 | + * @param string $model \news\models\Tag::className() |
|
| 30 | + * @param string $refJoinTable news_article_tag |
|
| 31 | + * @param string $refModelPkId news_article_tag.arictle_id |
|
| 32 | + * @param string $refJoinPkId news_article_tag.tag_id |
|
| 33 | + * @param string[] $displayFields |
|
| 34 | 34 | * @param string $displayTemplate |
| 35 | 35 | */ |
| 36 | 36 | public function __construct($model, $refJoinTable, $refModelPkId, $refJoinPkId, array $displayFields, $displayTemplate = null) |
@@ -119,6 +119,9 @@ discard block |
||
| 119 | 119 | return $this->_buttons; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | + /** |
|
| 123 | + * @param string $type |
|
| 124 | + */ |
|
| 122 | 125 | public function apiQueryString($type) |
| 123 | 126 | { |
| 124 | 127 | // basic query |
@@ -226,6 +229,12 @@ discard block |
||
| 226 | 229 | ]; |
| 227 | 230 | } |
| 228 | 231 | |
| 232 | + /** |
|
| 233 | + * @param string $configContext |
|
| 234 | + * @param string $elmnId |
|
| 235 | + * @param string $elmnModel |
|
| 236 | + * @param boolean $elmni18n |
|
| 237 | + */ |
|
| 229 | 238 | private function renderElementPlugins($configContext, $plugins, $elmnId, $elmnName, $elmnModel, $elmnAlias, $elmni18n) |
| 230 | 239 | { |
| 231 | 240 | $doc = new DOMDocument('1.0'); |
@@ -247,11 +256,17 @@ discard block |
||
| 247 | 256 | return $obj->$method($DOMDocument); |
| 248 | 257 | } |
| 249 | 258 | |
| 259 | + /** |
|
| 260 | + * @param string $configContext |
|
| 261 | + */ |
|
| 250 | 262 | private function ngModelString($configContext, $fieldId) |
| 251 | 263 | { |
| 252 | 264 | return 'data.'.$configContext.'.'.$fieldId; |
| 253 | 265 | } |
| 254 | 266 | |
| 267 | + /** |
|
| 268 | + * @param string $configContext |
|
| 269 | + */ |
|
| 255 | 270 | private function i18nNgModelString($configContext, $fieldId, $lang) |
| 256 | 271 | { |
| 257 | 272 | 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 | */ |
@@ -229,6 +229,7 @@ discard block |
||
| 229 | 229 | |
| 230 | 230 | /** |
| 231 | 231 | * Internal used to retriev redirect data if any |
| 232 | + * @param string $key |
|
| 232 | 233 | * @return multitype: |
| 233 | 234 | */ |
| 234 | 235 | protected function redirectMapData($key) |
@@ -313,7 +314,7 @@ discard block |
||
| 313 | 314 | /** |
| 314 | 315 | * Get all sibilings for the current item, this also includes the current item iteself. |
| 315 | 316 | * |
| 316 | - * @return array An array with all item-object siblings |
|
| 317 | + * @return QueryIteratorFilter An array with all item-object siblings |
|
| 317 | 318 | * @since 1.0.0-beta3 |
| 318 | 319 | */ |
| 319 | 320 | public function getSiblings() |
@@ -342,7 +343,7 @@ discard block |
||
| 342 | 343 | /** |
| 343 | 344 | * Get all children of the current item. Children means going the depth/menulevel down e.g. from 1 to 2. |
| 344 | 345 | * |
| 345 | - * @return \cms\menu\QueryIterator Returns all children |
|
| 346 | + * @return QueryIteratorFilter Returns all children |
|
| 346 | 347 | */ |
| 347 | 348 | public function getChildren() |
| 348 | 349 | { |
@@ -369,6 +370,7 @@ discard block |
||
| 369 | 370 | * |
| 370 | 371 | * @see \cms\menu\Query::with() |
| 371 | 372 | * |
| 373 | + * @param string $with |
|
| 372 | 374 | * @return \cms\menu\Item; |
| 373 | 375 | */ |
| 374 | 376 | public function with($with) |