@@ -14,6 +14,9 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | class FileBind |
| 16 | 16 | { |
| 17 | + /** |
|
| 18 | + * @param \yii\base\Component $model |
|
| 19 | + */ |
|
| 17 | 20 | public function bind($model, $attribute, $files) |
| 18 | 21 | { |
| 19 | 22 | $newFiles = $this->newFiles($model, $attribute, $files); |
@@ -212,6 +215,10 @@ discard block |
||
| 212 | 215 | return $query->indexBy(key($relation->link))->all(); |
| 213 | 216 | } |
| 214 | 217 | |
| 218 | + /** |
|
| 219 | + * @param \yii\base\Component $model |
|
| 220 | + * @param string $attribute |
|
| 221 | + */ |
|
| 215 | 222 | public function file($model, $attribute) |
| 216 | 223 | { |
| 217 | 224 | $relation = $model->fileOption($attribute, 'relation'); |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace rkit\filemanager\behaviors; |
| 10 | 10 | |
| 11 | 11 | use Yii; |
| 12 | -use yii\helpers\ArrayHelper; |
|
| 13 | 12 | use yii\db\Query; |
| 14 | 13 | |
| 15 | 14 | class FileBind |
@@ -185,6 +185,9 @@ discard block |
||
| 185 | 185 | return; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | + /** |
|
| 189 | + * @param string $attribute |
|
| 190 | + */ |
|
| 188 | 191 | private function setState($attribute, $file) |
| 189 | 192 | { |
| 190 | 193 | $rec = new FileUploadSession(); |
@@ -302,7 +305,7 @@ discard block |
||
| 302 | 305 | * Get file storage |
| 303 | 306 | * |
| 304 | 307 | * @param string $attribute The attribute name |
| 305 | - * @return \Flysystem |
|
| 308 | + * @return string |
|
| 306 | 309 | */ |
| 307 | 310 | public function fileStorage($attribute) |
| 308 | 311 | { |
@@ -565,6 +568,9 @@ discard block |
||
| 565 | 568 | static::$classPathMap[$source] = $mapTo; |
| 566 | 569 | } |
| 567 | 570 | |
| 571 | + /** |
|
| 572 | + * @param string $source |
|
| 573 | + */ |
|
| 568 | 574 | protected static function getClass($source) { |
| 569 | 575 | return isset(static::$classPathMap[$source]) |
| 570 | 576 | ? static::$classPathMap[$source] |