jFormsControl

base class for all jforms control

package

jelix

subpackage

forms

Methods

__construct

__construct(string $ref) 

Arguments

$ref

string

the identifiant of the control

check and filter the value of the control.

check() : integer|null

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

Response

integer|null

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

deactivate

deactivate( $deactivation = true) 

Arguments

$deactivation

getAttribute

getAttribute( $name) 

Arguments

$name

getDisplayValue

getDisplayValue( $value) 

Arguments

$value

getWidgetType

getWidgetType() : string
since 1.6.14

Response

string

the default widget type to use to render the control

check if the control is activated

isActivated() : boolean

Response

boolean

true if it is activated

says if the control can have multiple values

isContainer() 

says if the content is html or not

isHtmlContent() 
since 1.2

check if the control is readonly

isReadOnly() : boolean

Response

boolean

true if it is readonly

setAttribute

setAttribute( $name,  $value) 

Arguments

$name

$value

setData

setData( $value) 

Arguments

$value

setDataFromDao

setDataFromDao( $value,  $daoDatatype) 

Arguments

$value

$daoDatatype

setForm

setForm(\jFormsBase $form) 

Arguments

$form

\jFormsBase

setReadOnly

setReadOnly( $r = true) 

Arguments

$r

setValueFromRequest

setValueFromRequest(\jRequest $request) 

Arguments

$request

\jRequest

Properties

a type name that identify the control type

type : string
var

a type name that identify the control type

Type(s)

string

the identifiant of the control

ref : string
var

the identifiant of the control

Type(s)

string

the object that manage constraints on the value

datatype : \jDatatype
var

the object that manage constraints on the value

Type(s)

\jDatatype

true if the control should be filled by the user

required : boolean
var

true if the control should be filled by the user

Type(s)

boolean

the label

label : string
var

the label

Type(s)

string

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

defaultValue : mixed
var

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

Type(s)

mixed

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

help : string
var

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

Type(s)

string

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

hint : string
var

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

Type(s)

string

the message when the value is invalid

alertInvalid : string
var

the message when the value is invalid

Type(s)

string

the message when there is no value and it is required

alertRequired : string
var

the message when there is no value and it is required

Type(s)

string

indicate if the control is in read only mode

initialReadOnly : boolean
var

indicate if the control is in read only mode

Type(s)

boolean

initialActivation

initialActivation : boolean
var

Type(s)

boolean

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

emptyValueLabel : string
var

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

Type(s)

string

the form object

form : \jFormsBase
var

the form object

Type(s)

\jFormsBase

content all values of the form

container : \jFormsDataContainer
var

content all values of the form

Type(s)

\jFormsDataContainer

miscellaneous values attached to the control

attributes : array
var

miscellaneous values attached to the control

Type(s)

array