1 | <?php |
||
27 | class File extends Behavior |
||
28 | { |
||
29 | /** |
||
30 | * @var string the attribute which holds the attachment. |
||
31 | */ |
||
32 | public $attribute = 'file'; |
||
33 | |||
34 | /** |
||
35 | * @var array the scenarios in which the behavior will be triggered |
||
36 | */ |
||
37 | public $scenarios = []; |
||
38 | |||
39 | /** |
||
40 | * @var string the attribute that will receive the file id |
||
41 | */ |
||
42 | public $targetAttribute; |
||
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | public function events() |
||
54 | |||
55 | /** |
||
56 | * Event handler for beforeInsert and beforeUpdate actions |
||
57 | * |
||
58 | * @param \yii\base\ModelEvent $event |
||
59 | */ |
||
60 | public function processFiles($event) |
||
82 | |||
83 | /** |
||
84 | * Uploads file to the API server |
||
85 | * |
||
86 | * @param UploadedFile $file |
||
87 | * @return \hipanel\models\File |
||
88 | */ |
||
89 | private function uploadFile(UploadedFile $file) |
||
97 | } |
||
98 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.