Class NFileUpload
Text box and browse button that allow users to select a file to upload to the server.
- NObject
-
NComponent implements IComponent
-
NFormControl implements IFormControl
-
NFileUpload
public
|
#
__construct(
string
$label = NULL
)
Parameters$label string label |
protected
void
|
#
attached(
IComponent
$form
)
This method will be called when the component (or component's parent) This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself. Parameters$form IComponent |
public
NFileUpload
|
#
setValue(
array|NHttpUploadedFile
$value
)
Sets control's value. Sets control's value. Parameters$value array|NHttpUploadedFileReturnsNFileUpload provides a fluent interface
Implementation of |
public static
bool
|
#
validateFilled(
IFormControl
$control
)
Filled validator: has been any file uploaded? Filled validator: has been any file uploaded? Parameters$control IFormControl |
public static
bool
|
#
validateFileSize(
NFileUpload
$control,
int
$limit
)
FileSize validator: is file size in limit? FileSize validator: is file size in limit? Parameters$control NFileUpload$limit int file size limit |
public static
bool
|
#
validateMimeType(
NFileUpload
$control,
array|string
$mimeType
)
MimeType validator: has file specified mime type? MimeType validator: has file specified mime type? Parameters$control NFileUpload$mimeType array|string mime type |
public static
bool
|
#
validateImage(
NFileUpload
$control
)
NImage validator: is file image? NImage validator: is file image? Parameters$control NFileUpload |
Methods Inherited From NFormControl
__construct(), attached(), getForm(), getHtmlName(), setHtmlId(), getHtmlId(), setAttribute(), setOption(), getOption(), getOptions(), setTranslator(), getTranslator(), translate(), setValue(), getValue(), setDefaultValue(), loadHttpData(), setDisabled(), isDisabled(), getControl(), getLabel(), getControlPrototype(), getLabelPrototype(), setRendered(), isRendered(), addRule(), addCondition(), addConditionOn(), getRules(), setRequired(), isRequired(), notifyRule(), validateEqual(), validateFilled(), validateValid(), addError(), getErrors(), hasErrors(), cleanErrors()
Methods Inherited From NComponent
__construct(), lookup(), lookupPath(), monitor(), unmonitor(), attached(), detached(), getName(), getParent(), setParent(), validateParent(), __clone(), __wakeup()
Methods Inherited From NObject
getReflection(), __call(), __callStatic(), extensionMethod(), __get(), __set(), __isset(), __unset()
Constants Inherited From NComponent
NAME_SEPARATOR
Properties Inherited From NFormControl
$idMask, $caption, $value, $control, $label