| 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 | * @var bool |
||
| 29 | */ |
||
| 30 | protected $columnize = false; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritdoc |
||
| 34 | */ |
||
| 35 | public function getViewName() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param mixed $file |
||
| 42 | * @return self |
||
| 43 | */ |
||
| 44 | public function newValue($file) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param void |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function getTableValue() |
||
| 66 | } |
||
| 67 |
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: