@param null|int|string $name Optional name for the element
Parameters: | array – Optional options for the element |
---|---|
Throws ExceptionInvalidArgumentException: | |
This function is automatically called when creating element with factory. It allows to perform various operations (add elements...)
Return type: | void |
---|
Set value for name
Parameters: | string – |
---|---|
Return type: | Element|ElementInterface |
Set options for an element. Accepted options are: - label: label to associate with the element - label_attributes: attributes to use when the label is rendered
Parameters: | array|Traversable – |
---|---|
Return type: | Element|ElementInterface |
Throws : | ExceptionInvalidArgumentException |
Return the specified option
Parameters: | string – |
---|---|
Return type: | NULL|mixed |
Set a single element attribute
Parameters: |
|
---|---|
Return type: | Element|ElementInterface |
Retrieve a single element attribute
Parameters: | $key – |
---|---|
Return type: | mixed|null |
Remove a single attribute
Parameters: | string – |
---|---|
Return type: | ElementInterface |
Does the element has a specific attribute ?
Parameters: | string – |
---|---|
Return type: | bool |
Set many attributes at once
Implementation will decide if this will overwrite or merge.
Parameters: | array|Traversable – |
---|---|
Return type: | Element|ElementInterface |
Throws : | ExceptionInvalidArgumentException |
Retrieve all attributes at once
Return type: | array|Traversable |
---|
Remove many attributes at once
Parameters: | array – |
---|---|
Return type: | ElementInterface |
Clear all attributes
Return type: | Element|ElementInterface |
---|
Set the label used for this element
Parameters: | $label – |
---|---|
Return type: | Element|ElementInterface |
Set the attributes to use with the label
Parameters: | array – |
---|---|
Return type: | Element|ElementInterface |
Get the attributes to use with the label
Return type: | array |
---|