Jelix 1.7.18

jFormsControlUpload extends jFormsControl
in package

base class for all jforms control.

Tags
subpackage

forms

Table of Contents

$accept  : string
list of type mime or case-insensitive filename extension or one of these types audio/*, video/*, or image/*.
$alertInvalid  : string
$alertRequired  : string
$capture  : string
$datatype  : jDatatype
$defaultValue  : mixed
$emptyValueLabel  : string
$fileInfo  : mixed
$help  : string
$hint  : string
$initialActivation  : bool
$initialReadOnly  : bool
$label  : string
$maxsize  : mixed
$mimetype  : array<string|int, mixed>
Used to verify the file mime type after the file was uploaded.
$ref  : string
$required  : bool
$type  : string
$attributes  : array<string|int, mixed>
$container  : jFormsDataContainer
$form  : jFormsBase
$modified  : mixed
__construct()  : mixed
check()  : null|int
check and filter the value of the control.
deactivate()  : mixed
getAttribute()  : mixed
getDisplayValue()  : mixed
getWidgetType()  : string
isActivated()  : bool
check if the control is activated.
isContainer()  : mixed
says if the control can have multiple values.
isHtmlContent()  : mixed
says if the content is html or not.
isModified()  : mixed
isReadOnly()  : bool
check if the control is readonly.
saveFile()  : mixed
setAttribute()  : mixed
setData()  : mixed
setDataFromDao()  : mixed
setForm()  : mixed
setReadOnly()  : mixed
setValueFromRequest()  : mixed
_diffValues()  : bool

Properties

$accept

list of type mime or case-insensitive filename extension or one of these types audio/*, video/*, or image/*.

public string $accept = ''

All values should be separated by a comma

This property is used to fill the accept HTML attribute

the content of the accept HTML attribute

$alertInvalid

public string $alertInvalid = ''

the message when the value is invalid

$alertRequired

public string $alertRequired = ''

the message when there is no value and it is required

$defaultValue

public mixed $defaultValue = ''

the value when the form is created (and not initialized by a data source

$emptyValueLabel

public string $emptyValueLabel

label displayed when only values are displayed, and when there is no value

$help

public string $help = ''

the message for the help on the control (typically help displayed in a popup)

$hint

public string $hint = ''

the message for tips on the control (typically the tooltip value)

$initialReadOnly

public bool $initialReadOnly = alse

indicate if the control is in read only mode

$mimetype

Used to verify the file mime type after the file was uploaded.

public array<string|int, mixed> $mimetype = array()

list of possible mime types

$required

public bool $required = alse

true if the control should be filled by the user

$attributes

protected array<string|int, mixed> $attributes = array()

miscellaneous values attached to the control

Methods

__construct()

public __construct(string $ref) : mixed
Parameters
$ref : string

the identifiant of the control

Return values
mixed

check()

check and filter the value of the control.

public check() : null|int

It is the responsability of the implementation to fill the "errors" or "data" properties of the container.

Return values
null|int

null if it is ok, or one of jForms::ERRDATA_* constants when there is an error

deactivate()

public deactivate([mixed $deactivation = true ]) : mixed
Parameters
$deactivation : mixed = true
Return values
mixed

getAttribute()

public getAttribute(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

getDisplayValue()

public getDisplayValue(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

getWidgetType()

public getWidgetType() : string
Tags
since
1.6.14
Return values
string

the default widget type to use to render the control

isActivated()

check if the control is activated.

public isActivated() : bool
Return values
bool

true if it is activated

isContainer()

says if the control can have multiple values.

public isContainer() : mixed
Return values
mixed

isHtmlContent()

says if the content is html or not.

public isHtmlContent() : mixed
Tags
since
1.2
Return values
mixed

isReadOnly()

check if the control is readonly.

public isReadOnly() : bool
Return values
bool

true if it is readonly

saveFile()

public saveFile(mixed $directoryPath[, mixed $alternateName = '' ][, mixed $deletePreviousFile = true ]) : mixed
Parameters
$directoryPath : mixed
$alternateName : mixed = ''
$deletePreviousFile : mixed = true
Return values
mixed

setAttribute()

public setAttribute(mixed $name, mixed $value) : mixed
Parameters
$name : mixed
$value : mixed
Return values
mixed

setData()

public setData(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

setDataFromDao()

public setDataFromDao(mixed $value, mixed $daoDatatype) : mixed
Parameters
$value : mixed
$daoDatatype : mixed
Return values
mixed

setReadOnly()

public setReadOnly([mixed $r = true ]) : mixed
Parameters
$r : mixed = true
Return values
mixed

setValueFromRequest()

public setValueFromRequest(mixed $request) : mixed
Parameters
$request : mixed
Return values
mixed

_diffValues()

protected _diffValues(mixed &$v1, mixed &$v2) : bool
Parameters
$v1 : mixed
$v2 : mixed
Return values
bool

true if the values are not equals

Search results