Class MonthSelect

Summary

Fully Qualified Name: Zend\Form\Element\MonthSelect
Extends: Element
Implements: InputProviderInterface, ElementPrepareAwareInterface

Description

Methods

Name Description Defined By
__clone() Clone the element (this is needed by Collection element, as it needs different copies of the elements) MonthSelect
__construct() Constructor. Add two selects elements MonthSelect
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
getElements() Get both the year and month elements MonthSelect
getInputSpecification() Should return an array specification compatible with {@link Zend\InputFilter\Factory::createInput()}. MonthSelect
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
getMaxYear() MonthSelect
getMessages() Get validation error messages, if any. Element
getMinYear() MonthSelect
getMonthAttributes() Get the month attributes MonthSelect
getMonthElement() MonthSelect
getName() Get value for name Element
getOption() Return the specified option Element
getOptions() Get defined options Element
getValue() MonthSelect
getYearAttributes() Get the year attributes MonthSelect
getYearElement() MonthSelect
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
prepareElement() Prepare the form element (mostly used for rendering purposes) MonthSelect
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
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
setMaxYear() MonthSelect
setMessages() Set a list of messages to report when validation fails Element
setMinYear() MonthSelect
setMonthAttributes() Set the month attributes MonthSelect
setName() Set value for name Element
setOption() Set a single option for an element Element
setOptions() Set element options. MonthSelect
setShouldCreateEmptyOption() MonthSelect
setShouldRenderDelimiters() MonthSelect
setValue() MonthSelect
setYearAttributes() Set the year attributes MonthSelect
shouldCreateEmptyOption() MonthSelect
shouldRenderDelimiters() MonthSelect

Method Details

__clone()

Clone the element (this is needed by Collection element, as it needs different copies of the elements)

Returns:

__construct()

Constructor. Add two selects elements

Parameter Name Type Description
$name null|int|string Optional
$options array Optional

Returns:

clearAttributes()

Clear all attributes

Returns: \Element|\ElementInterface

clearLabelOptions()

Clear all label options

Returns: \Element|\ElementInterface

getAttribute()

Retrieve a single element attribute

Parameter Name Type Description
$key
$key

Returns: mixed|null

getAttributes()

Retrieve all attributes at once

Returns: array|\Traversable

getElements()

Get both the year and month elements

Returns: array

getInputSpecification()

Should return an array specification compatible with {@link Zend\InputFilter\Factory::createInput()}.

Returns: array

getLabel()

Retrieve the label used for this element

Returns: null|string

getLabelAttributes()

Get the attributes to use with the label

Returns: array

getLabelOption()

Retrieve a single label option

Parameter Name Type Description
$key
$key

Returns: mixed|null

getLabelOptions()

Get label specific options

Returns: array

getMaxYear()

Returns: int

getMessages()

Get validation error messages, if any.

Returns a list of validation failure messages, if any.

Returns: array|\Traversable

getMinYear()

Returns: int

getMonthAttributes()

Get the month attributes

Returns: array

getMonthElement()

Returns: \Select

getName()

Get value for name

Returns: string|int

getOption()

Return the specified option

Parameter Name Type Description
$option string

Returns: null|mixed

getOptions()

Get defined options

Returns: array

getValue()

Returns: string

getYearAttributes()

Get the year attributes

Returns: array

getYearElement()

Returns: \Select

hasAttribute()

Does the element has a specific attribute ?

Parameter Name Type Description
$key string

Returns: bool

hasLabelOption()

Does the element has a specific label option ?

Parameter Name Type Description
$key string

Returns: bool

init()

This function is automatically called when creating element with factory. It allows to perform various operations (add elements.

..)

Returns: void

prepareElement()

Prepare the form element (mostly used for rendering purposes)

Parameter Name Type Description
$form \FormInterface

Returns: void

removeAttribute()

Remove a single attribute

Parameter Name Type Description
$key string

Returns: \ElementInterface

removeAttributes()

Remove many attributes at once

Parameter Name Type Description
$keys array

Returns: \ElementInterface

removeLabelOption()

Remove a single label option

Parameter Name Type Description
$key string

Returns: \ElementInterface

removeLabelOptions()

Remove many attributes at once

Parameter Name Type Description
$keys array

Returns: \ElementInterface

setAttribute()

Set a single element attribute

Parameter Name Type Description
$key string
$value mixed

Returns: \Element|\ElementInterface

setAttributes()

Set many attributes at once

Implementation will decide if this will overwrite or merge.

Parameter Name Type Description
$arrayOrTraversable array|\Traversable

Returns: \Element|\ElementInterface

setLabel()

Set the label used for this element

Parameter Name Type Description
$label
$label

Returns: \Element|\ElementInterface

setLabelAttributes()

Set the attributes to use with the label

Parameter Name Type Description
$labelAttributes array

Returns: \Element|\ElementInterface

setLabelOption()

Set a single label optionn

Parameter Name Type Description
$key string
$value mixed

Returns: \Element|\ElementInterface

setLabelOptions()

Set many label options at once

Implementation will decide if this will overwrite or merge.

Parameter Name Type Description
$arrayOrTraversable array|\Traversable

Returns: \Element|\ElementInterface

setMaxYear()

Parameter Name Type Description
$maxYear int

Returns: self

setMessages()

Set a list of messages to report when validation fails

Parameter Name Type Description
$messages array|\Traversable

Returns: \Element|\ElementInterface

setMinYear()

Parameter Name Type Description
$minYear int

Returns: self

setMonthAttributes()

Set the month attributes

Parameter Name Type Description
$monthAttributes array

Returns: self

setName()

Set value for name

Parameter Name Type Description
$name string

Returns: \Element|\ElementInterface

setOption()

Set a single option for an element

Parameter Name Type Description
$key string
$value mixed

Returns: self

setOptions()

Set element options.

Accepted options for MonthSelect:

Parameter Name Type Description
$options array|\Traversable

Returns: self

setShouldCreateEmptyOption()

Parameter Name Type Description
$createEmptyOption bool

Returns: self

setShouldRenderDelimiters()

Parameter Name Type Description
$renderDelimiters bool

Returns: self

setValue()

Parameter Name Type Description
$value mixed

Returns: self

setYearAttributes()

Set the year attributes

Parameter Name Type Description
$yearAttributes array

Returns: self

shouldCreateEmptyOption()

Returns: bool

shouldRenderDelimiters()

Returns: bool

Top