Methods

setName()

setName(string  $name) : \Pop\Form\Element\ElementInterface

Set the name of the form element

Parameters

string $name

Returns

\Pop\Form\Element\ElementInterface

setValue()

setValue(mixed  $value) : \Pop\Form\Element\ElementInterface

Set the value of the form element

Parameters

mixed $value

Returns

\Pop\Form\Element\ElementInterface

setLabel()

setLabel(mixed  $label) : \Pop\Form\Element\ElementInterface

Set the label of the form element

Parameters

mixed $label

Returns

\Pop\Form\Element\ElementInterface

setLabelAttributes()

setLabelAttributes(array  $attribs) : \Pop\Form\Element\ElementInterface

Set the attributes of the label of the form element

Parameters

array $attribs

Returns

\Pop\Form\Element\ElementInterface

setRequired()

setRequired(boolean  $required) : mixed

Set whether the form element is required

Parameters

boolean $required

Returns

mixed

setErrorPre()

setErrorPre(boolean  $pre) : \Pop\Form\Element\ElementInterface

Set error to display before the element

Parameters

boolean $pre

Returns

\Pop\Form\Element\ElementInterface

isErrorPre()

isErrorPre() : boolean

Determine if error to display before the element

Returns

boolean

setValidators()

setValidators(array  $validators = array()) : \Pop\Form\Element\ElementInterface

Set validators

Parameters

array $validators

Returns

\Pop\Form\Element\ElementInterface

getName()

getName() : string

Get form element name

Returns

string

getType()

getType() : string

Get form element object type

Returns

string

getValue()

getValue() : mixed

Get form element value

Returns

mixed

getLabel()

getLabel() : string

Get form element label

Returns

string

getLabelAttributes()

getLabelAttributes() : array

Get the attributes of the form element label

Returns

array

getValidators()

getValidators() : array

Get validators

Returns

array

isRequired()

isRequired() : boolean

Get whether the form element is required

Returns

boolean

getErrors()

getErrors() : array

Get form element errors

Returns

array

hasErrors()

hasErrors() : array

Get if form element has errors

Returns

array

addValidator()

addValidator(mixed  $validator) : \Pop\Form\Element\ElementInterface

Add a validator the form element

Parameters

mixed $validator

Returns

\Pop\Form\Element\ElementInterface

validate()

validate() : boolean

Validate the form element

Throws

\Pop\Form\Element\Exception

Returns

boolean