Class FileUpload (namespace Nette\Forms)
Text box and browse button that allow users to select a file to upload to the server.
Object | --Component | --FormControl | --FileUpload
Public Method Summary | |
---|---|
FileUpload |
__construct
(string $label)
|
void |
setValue
(array|Nette\Web\HttpUploadedFile $value)
Sets control's value.
|
static bool |
validateFileSize
(FileUpload $control, int $limit)
FileSize validator: is file size in limit?
|
static bool |
validateFilled
(IFormControl $control)
Filled validator: has been any file uploaded?
|
static bool |
validateMimeType
(FileUpload $control, array|string $mimeType)
MimeType validator: has file specified mime type?
|
Protected Method Summary | |
---|---|
protected void |
attached
(IComponent $form)
This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
|
Methods Inherited From Component |
---|
__construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup() |
Methods Inherited From Object |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary |
---|
Method Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 40 __constructpublic FileUpload __construct (string $label)
|
|||||||||||||||
line 55 attachedprotected void attached (IComponent $form) This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
|
|||||||||||||||
line 69 setValuepublic void setValue (array|Nette\Web\HttpUploadedFile $value) Sets control's value.
|
|||||||||||||||
line 104 validateFileSizepublic static bool validateFileSize (FileUpload $control, int $limit) FileSize validator: is file size in limit?
|
|||||||||||||||
line 90 validateFilledpublic static bool validateFilled (IFormControl $control) Filled validator: has been any file uploaded?
|
|||||||||||||||
line 118 validateMimeTypepublic static bool validateMimeType (FileUpload $control, array|string $mimeType) MimeType validator: has file specified mime type?
|