| Fully Qualified Name: | Laminas\Form\ElementInterface |
| Name | Description | Defined By |
|---|---|---|
| getAttribute() | Retrieve a single element attribute | ElementInterface |
| getAttributes() | Retrieve all attributes at once | ElementInterface |
| getLabel() | Retrieve the label (if any) used for this element | ElementInterface |
| getMessages() | Get validation error messages, if any | ElementInterface |
| getName() | Retrieve the element name | ElementInterface |
| getOption() | return the specified option | ElementInterface |
| getOptions() | get the defined options | ElementInterface |
| getValue() | Retrieve the element value | ElementInterface |
| hasAttribute() | Return true if a specific attribute is set | ElementInterface |
| setAttribute() | Set a single element attribute | ElementInterface |
| setAttributes() | Set many attributes at once | ElementInterface |
| setLabel() | Set the label (if any) used for this element | ElementInterface |
| setMessages() | Set a list of messages to report when validation fails | ElementInterface |
| setName() | Set the name of this element | ElementInterface |
| setOption() | Set a single option for an element | ElementInterface |
| setOptions() | Set options for an element | ElementInterface |
| setValue() | Set the value of the element | ElementInterface |
Retrieve a single element attribute
| Parameter Name | Type | Description |
|---|---|---|
| $key | string |
Returns: mixed
Retrieve all attributes at once
Returns: array|\Traversable
Retrieve the label (if any) used for this element
Returns: string
Get validation error messages, if any
Returns a list of validation failure messages, if any.
Returns: array|\Traversable
Retrieve the element name
Returns: string
return the specified option
| Parameter Name | Type | Description |
|---|---|---|
| $option | string |
Returns: null|mixed
get the defined options
Returns: array
Retrieve the element value
Returns: mixed
Return true if a specific attribute is set
| Parameter Name | Type | Description |
|---|---|---|
| $key | string |
Returns: bool
Set a single element attribute
| Parameter Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |
Returns: $this
Set many attributes at once
Implementation will decide if this will overwrite or merge.
| Parameter Name | Type | Description |
|---|---|---|
| $arrayOrTraversable | array|\Traversable |
Returns: $this
Set the label (if any) used for this element
| Parameter Name | Type | Description |
|---|---|---|
| $label | ||
| $label |
Returns: $this
Set a list of messages to report when validation fails
| Parameter Name | Type | Description |
|---|---|---|
| $messages | array|\Traversable |
Returns: $this
Set the name of this element
In most cases, this will proxy to the attributes for storage, but is present to indicate that elements are generally named.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns: $this
Set a single option for an element
| Parameter Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |
Returns: $this
Set options for an element
| Parameter Name | Type | Description |
|---|---|---|
| $options | array|\Traversable |
Returns: $this
Set the value of the element
| Parameter Name | Type | Description |
|---|---|---|
| $value | mixed |
Returns: $this