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 |
| VALID |
|
Methods
No description
No description
No description
No description
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()
No description
at line 62
string
getHtmlName()
No description
at line 71
UploadControl
setValue($value)
| internal |
No description
at line 81
FileUpload|array|null
getValue()
Returns the uploaded file(s), a dummy FileUpload(null) when nothing was uploaded, or null when nullable is set.
at line 90
bool
isFilled()
Has been any file uploaded?
at line 99
UploadControl
setNullable(bool $value = true)
Sets whether getValue() returns null instead of FileUpload with error UPLOAD_ERR_NO_FILE.
at line 106
bool
isNullable()
No description
at line 116
bool
isOk()
| internal |
Have been all files successfully uploaded?
at line 127
UploadControl
addRule(callable|string $validator, string|Stringable|null $errorMessage = null, mixed $arg = null)
No description