Fully Qualified Name: | Laminas\Form\Element\Month |
Extends: | DateTime |
Name | Description | Defined By |
---|---|---|
__construct() | Element | |
clearAttributes() | Clear all attributes | Element |
clearLabelOptions() | Clear all label options | Element |
getAttribute() | Retrieve a single element attribute | Element |
getAttributes() | Retrieve all attributes at once | Element |
getFormat() | Retrieve the DateTime format to use for the value | DateTime |
getInputSpecification() | Provide default input rules for this element | DateTime |
getLabel() | Retrieve the label used for this element | Element |
getLabelAttributes() | Get the attributes to use with the label | Element |
getLabelOption() | Retrieve a single label option | Element |
getLabelOptions() | Get label specific options | Element |
getMessages() | Get validation error messages, if any. | Element |
getName() | Get value for name | Element |
getOption() | Return the specified option | Element |
getOptions() | Get defined options | Element |
getValue() | Retrieve the element value | DateTime |
hasAttribute() | Does the element has a specific attribute ? | Element |
hasLabelOption() | Does the element has a specific label option ? | Element |
init() | This function is automatically called when creating element with factory. It allows to perform various operations (add elements. | Element |
removeAttribute() | Remove a single attribute | Element |
removeAttributes() | Remove many attributes at once | Element |
removeLabelOption() | Remove a single label option | Element |
removeLabelOptions() | Remove many attributes at once | Element |
setAttribute() | Set a single element attribute | Element |
setAttributes() | Set many attributes at once | Element |
setFormat() | Set value for format | DateTime |
setLabel() | Set the label used for this element | Element |
setLabelAttributes() | Set the attributes to use with the label | Element |
setLabelOption() | Set a single label optionn | Element |
setLabelOptions() | Set many label options at once | Element |
setMessages() | Set a list of messages to report when validation fails | Element |
setName() | Set value for name | Element |
setOption() | Set a single option for an element | Element |
setOptions() | Accepted options for DateTime: - format: A \DateTime compatible string | DateTime |
setValue() | Set the element value | Element |
Parameter Name | Type | Description |
---|---|---|
$name | null|int|string | Optional |
$options | array|\Traversable | Optional |
Returns:
Clear all attributes
Returns: $this
Clear all label options
Returns: $this
Retrieve a single element attribute
Parameter Name | Type | Description |
---|---|---|
$key | ||
$key |
Returns: mixed|null
Retrieve all attributes at once
Returns: array|\Traversable
Retrieve the DateTime format to use for the value
Returns: string
Provide default input rules for this element
Attaches default validators for the datetime input.
Returns: array
Retrieve the label used for this element
Returns: null|string
Get the attributes to use with the label
Returns: array
Retrieve a single label option
Parameter Name | Type | Description |
---|---|---|
$key | ||
$key |
Returns: mixed|null
Get label specific options
Returns: array
Get validation error messages, if any.
Returns a list of validation failure messages, if any.
Returns: array|\Traversable
Get value for name
Returns: string|int
Return the specified option
Parameter Name | Type | Description |
---|---|---|
$option | string |
Returns: null|mixed
Get defined options
Returns: array
Retrieve the element value
If the value is instance of DateTimeInterface, and $returnFormattedValue is true (the default), we return the string representation using the currently registered format.
If $returnFormattedValue is false, the original value will be returned, regardless of type.
Parameter Name | Type | Description |
---|---|---|
$returnFormattedValue | bool |
Returns: mixed
Does the element has a specific attribute ?
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
Does the element has a specific label option ?
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
This function is automatically called when creating element with factory. It allows to perform various operations (add elements.
..)
Returns: void
Remove a single attribute
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: $this
Remove many attributes at once
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: $this
Remove a single label option
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: $this
Remove many attributes at once
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: $this
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 value for format
Parameter Name | Type | Description |
---|---|---|
$format | string |
Returns: $this
Set the label used for this element
Parameter Name | Type | Description |
---|---|---|
$label | ||
$label |
Returns: $this
Set the attributes to use with the label
Parameter Name | Type | Description |
---|---|---|
$labelAttributes | array |
Returns: $this
Set a single label optionn
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Returns: $this
Set many label options at once
Implementation will decide if this will overwrite or merge.
Parameter Name | Type | Description |
---|---|---|
$arrayOrTraversable | array|\Traversable |
Returns: $this
Set a list of messages to report when validation fails
Parameter Name | Type | Description |
---|---|---|
$messages | array|\Traversable |
Returns: $this
Set value for name
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
Accepted options for DateTime: - format: A \DateTime compatible string
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable |
Returns: $this
Set the element value
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: $this