Methods

setName()

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

Set the name of the form element

Parameters

string $name

Returns

\Pop\Form\Element\AbstractElement

setValue()

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

Set the value of the form element

Parameters

mixed $value

Returns

\Pop\Form\Element\AbstractElement

setMarked()

setMarked(mixed  $marked) : \Pop\Form\Element\AbstractElement

Set the marked value(s) of the form element

Parameters

mixed $marked

Returns

\Pop\Form\Element\AbstractElement

setLabel()

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

Set the label of the form element

Parameters

mixed $label

Returns

\Pop\Form\Element\AbstractElement

setLabelAttributes()

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

Set the attributes of the label of the form element

Parameters

array $attribs

Returns

\Pop\Form\Element\AbstractElement

setRequired()

setRequired(boolean  $required) : \Pop\Form\Element\AbstractElement

Set whether the form element is required

Parameters

boolean $required

Returns

\Pop\Form\Element\AbstractElement

setErrorPre()

setErrorPre(boolean  $pre = true) : \Pop\Form\Element\AbstractElement

Set error pre-display

Parameters

boolean $pre

Returns

\Pop\Form\Element\AbstractElement

setErrorPost()

setErrorPost(boolean  $post = true) : \Pop\Form\Element\AbstractElement

Set error post-display

Parameters

boolean $post

Returns

\Pop\Form\Element\AbstractElement

setErrorDisplay()

setErrorDisplay(string  $container, array  $attribs, boolean  $pre = false) : \Pop\Form\Element\AbstractElement

Set error display values

Parameters

string $container
array $attribs
boolean $pre

Returns

\Pop\Form\Element\AbstractElement

setValidators()

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

Set validators

Parameters

array $validators

Returns

\Pop\Form\Element\AbstractElement

getName()

getName() : string

Get form element name

Returns

string

getType()

getType() : string

Get form element type

Returns

string

getValue()

getValue() : mixed

Get form element value

Returns

mixed

getMarked()

getMarked() : mixed

Get form element marked value(s)

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

getErrorDisplay()

getErrorDisplay() : array

Get error display values

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\AbstractElement

Add a validator the form element

Parameters

mixed $validator

Returns

\Pop\Form\Element\AbstractElement

validate()

validate() : boolean

Validate the form element

Throws

\Pop\Form\Element\Exception

Returns

boolean