Zend Framework
3.0
|
Public Member Functions | |
__construct ($name=null, $options=[]) | |
init () | |
This function is automatically called when creating element with factory. | |
setName ($name) | |
Set value for name. | |
getName () | |
Get value for name. | |
setOptions ($options) | |
Set options for an element. | |
getOptions () | |
Get defined options. | |
getOption ($option) | |
Return the specified option. | |
setOption ($key, $value) | |
Set a single option for an element. | |
setAttribute ($key, $value) | |
Set a single element attribute. | |
getAttribute ($key) | |
Retrieve a single element attribute. | |
removeAttribute ($key) | |
Remove a single attribute. | |
hasAttribute ($key) | |
Does the element has a specific attribute ? | |
setAttributes ($arrayOrTraversable) | |
Set many attributes at once. | |
getAttributes () | |
Retrieve all attributes at once. | |
removeAttributes (array $keys) | |
Remove many attributes at once. | |
clearAttributes () | |
Clear all attributes. | |
setValue ($value) | |
Set the element value. | |
getValue () | |
Retrieve the element value. | |
setLabel ($label) | |
Set the label used for this element. | |
getLabel () | |
Retrieve the label used for this element. | |
setLabelAttributes (array $labelAttributes) | |
Set the attributes to use with the label. | |
getLabelAttributes () | |
Get the attributes to use with the label. | |
setLabelOptions ($arrayOrTraversable) | |
Set many label options at once. | |
getLabelOptions () | |
Get label specific options. | |
clearLabelOptions () | |
Clear all label options. | |
removeLabelOptions (array $keys) | |
Remove many attributes at once. | |
setLabelOption ($key, $value) | |
Set a single label optionn. | |
getLabelOption ($key) | |
Retrieve a single label option. | |
removeLabelOption ($key) | |
Remove a single label option. | |
hasLabelOption ($key) | |
Does the element has a specific label option ? | |
setMessages ($messages) | |
Set a list of messages to report when validation fails. | |
getMessages () | |
Get validation error messages, if any. | |
Protected Attributes | |
$attributes = [] | |
$label | |
$labelAttributes = [] | |
$labelOptions = [] | |
$messages = [] | |
$options = [] | |
$value | |
__construct | ( | $name = null , |
|
$options = [] |
|||
) |
null | int | string | $name | Optional name for the element |
array | $options | Optional options for the element |
Exception\InvalidArgumentException |
clearAttributes | ( | ) |
clearLabelOptions | ( | ) |
getAttribute | ( | $key | ) |
getAttributes | ( | ) |
getLabel | ( | ) |
getLabelAttributes | ( | ) |
getLabelOption | ( | $key | ) |
getLabelOptions | ( | ) |
getMessages | ( | ) |
Get validation error messages, if any.
Returns a list of validation failure messages, if any.
Implements ElementInterface.
getName | ( | ) |
getOption | ( | $option | ) |
Return the specified option.
string | $option |
Implements ElementInterface.
getOptions | ( | ) |
getValue | ( | ) |
hasAttribute | ( | $key | ) |
Does the element has a specific attribute ?
string | $key |
Implements ElementInterface.
hasLabelOption | ( | $key | ) |
Does the element has a specific label option ?
string | $key |
Implements LabelAwareInterface.
init | ( | ) |
This function is automatically called when creating element with factory.
It allows to perform various operations (add elements...)
Implements InitializableInterface.
removeAttribute | ( | $key | ) |
Remove a single attribute.
string | $key |
Implements ElementAttributeRemovalInterface.
removeAttributes | ( | array | $keys | ) |
Remove many attributes at once.
array | $keys |
Implements ElementAttributeRemovalInterface.
removeLabelOption | ( | $key | ) |
Remove a single label option.
string | $key |
Implements LabelAwareInterface.
removeLabelOptions | ( | array | $keys | ) |
Remove many attributes at once.
array | $keys |
Implements LabelAwareInterface.
setAttribute | ( | $key, | |
$value | |||
) |
Set a single element attribute.
string | $key | |
mixed | $value |
Implements ElementInterface.
setAttributes | ( | $arrayOrTraversable | ) |
Set many attributes at once.
Implementation will decide if this will overwrite or merge.
array | Traversable | $arrayOrTraversable |
Exception\InvalidArgumentException |
Implements ElementInterface.
setLabel | ( | $label | ) |
Set the label used for this element.
$label |
Implements ElementInterface.
setLabelAttributes | ( | array | $labelAttributes | ) |
Set the attributes to use with the label.
array | $labelAttributes |
Implements LabelAwareInterface.
setLabelOption | ( | $key, | |
$value | |||
) |
Set a single label optionn.
string | $key | |
mixed | $value |
Implements LabelAwareInterface.
setLabelOptions | ( | $arrayOrTraversable | ) |
Set many label options at once.
Implementation will decide if this will overwrite or merge.
array | Traversable | $arrayOrTraversable |
Exception\InvalidArgumentException |
Implements LabelAwareInterface.
setMessages | ( | $messages | ) |
Set a list of messages to report when validation fails.
array | Traversable | $messages |
Exception\InvalidArgumentException |
Implements ElementInterface.
setName | ( | $name | ) |
Set value for name.
string | $name |
Implements ElementInterface.
setOption | ( | $key, | |
$value | |||
) |
Set a single option for an element.
string | $key | |
mixed | $value |
Implements ElementInterface.
setOptions | ( | $options | ) |
Set options for an element.
Accepted options are:
array | Traversable | $options |
Exception\InvalidArgumentException |
Implements ElementInterface.
setValue | ( | $value | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |