1 | <?php |
||
13 | class FileUploadField extends Field |
||
14 | { |
||
15 | use FieldHandleUpload; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | const TYPE = 'fileupload'; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | const MULTIPART = true; |
||
26 | |||
27 | /** |
||
28 | * @inheritdoc |
||
29 | */ |
||
30 | public function getViewName() |
||
34 | |||
35 | /** |
||
36 | * @param mixed $file |
||
37 | * @return self |
||
38 | */ |
||
39 | public function newValue($file) |
||
50 | |||
51 | /** |
||
52 | * @param void |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getTableValue() |
||
61 | } |
||
62 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: