UploadControl
class UploadControl extends BaseControl
Text box and browse button that allow users to select a file to upload to the server.
Constants
| Valid |
validation rule |
| deprecated VALID |
|
Methods
No description
Loads HTTP data.
Returns HTML name of control.
Returns the uploaded file(s), a dummy FileUpload(null) when nothing was uploaded, or null when nullable is set.
Has been any file uploaded?
Sets whether getValue() returns null instead of FileUpload with error UPLOAD_ERR_NO_FILE.
No description
Have been all files successfully uploaded?
No description
Details
at line 33
__construct(string|Stringable|null $label = null, bool $multiple = false)
No description
at line 56
void
loadHttpData()
Loads HTTP data.
at line 62
string
getHtmlName()
Returns HTML name of control.
at line 72
Control
setValue(mixed $value)
| internal |
No description
at line 82
mixed
getValue()
Returns the uploaded file(s), a dummy FileUpload(null) when nothing was uploaded, or null when nullable is set.
at line 91
bool
isFilled()
Has been any file uploaded?
at line 100
UploadControl
setNullable(bool $value = true)
Sets whether getValue() returns null instead of FileUpload with error UPLOAD_ERR_NO_FILE.
at line 107
bool
isNullable()
No description
at line 117
bool
isOk()
| internal |
Have been all files successfully uploaded?
at line 131
BaseControl
addRule(callable|string $validator, string|Stringable|null $errorMessage = null, mixed $arg = null)
No description