Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 0 |
1 | <?php |
||
11 | trait LoadFileTrait |
||
12 | { |
||
13 | /** |
||
14 | * @var string[] that defines which attributes will be recibe files. |
||
15 | * |
||
16 | * Example |
||
17 | * ```php |
||
18 | * [ |
||
19 | * // 'avatar' attribute load file uploaded as 'avatar' |
||
20 | * 'avatar', |
||
21 | * // 'background_fullsize' attribute load file uploaded as 'background' |
||
22 | * 'background_fullsize' => 'background', |
||
23 | * ] |
||
24 | * ``` |
||
25 | */ |
||
26 | public array $fileAttributes = []; |
||
27 | |||
28 | /** |
||
29 | * Parse the allowed uploaded files. |
||
30 | * |
||
31 | * @return UploadedFile[] files sent to the action. |
||
32 | */ |
||
33 | 5 | protected function parseFileAttributes(): array |
|
50 |