Element

Undocumented in source.

Constructors

this
this(string name, string[string] attributes)

@param string name @param array attributes

Members

Functions

addFilter
ElementInterface addFilter(string filter)

Adds a filter to current list of filters

addValidator
ElementInterface addValidator(ValidatorInterface validator)

Adds a validator to the element

getDefault
string getDefault()

Returns the default value assigned to the element

getFilters
string[] getFilters()

Returns the element filters

getForm
Form getForm()

Returns the parent form to the element

getLabel
string getLabel()

Returns the element label

getName
string getName()

Returns the element name

getValidators
ValidatorInterface[] getValidators()

Returns the validators registered for the element

setDefault
ElementInterface setDefault(string value)

Sets a default value in case the form does not use an entity or there is no value available for the element in _POST

setForm
ElementInterface setForm(Form form)

Sets the parent form to the element

setLabel
ElementInterface setLabel(string label)

Sets the element label

setName
ElementInterface setName(string name)

Sets the element name

toString
string toString()

Magic method __toString renders the widget without atttributes

Variables

_attributes
string[string] _attributes;
Undocumented in source.
_filters
string[] _filters;
Undocumented in source.
_form
Form _form;
Undocumented in source.
_label
string _label;
Undocumented in source.
_name
string _name;
Undocumented in source.
_validators
ValidatorInterface[] _validators;
Undocumented in source.
_value
string _value;
Undocumented in source.

Inherited Members

From ElementInterface

getValidators
ValidatorInterface[] getValidators()
Undocumented in source.
setForm
ElementInterface setForm(Form form)

Sets the parent form to the element

getForm
Form getForm()

Returns the parent form to the element

setName
ElementInterface setName(string name)

Sets the element's name

getName
string getName()

Returns the element's name

render
string render()

Renders the element widget

Meta