Methods

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

__clone() 

Constructor.

__construct(null | int | string $name, array $options) 

Add the day select element

Parameters

$name

nullintstring

Optional name for the element

$options

array

Optional options for the element

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Clear all attributes

clearAttributes() : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::clearAttributes()
inherited_from \Zend\Form\Element\MonthSelect::clearAttributes()

Returns

Clear all label options

clearLabelOptions() : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::clearLabelOptions()
inherited_from \Zend\Form\Element\MonthSelect::clearLabelOptions()

Returns

Retrieve a single element attribute

getAttribute($key) : mixed | null
Inherited

inherited_from \Zend\Form\Element::getAttribute()
inherited_from \Zend\Form\Element\MonthSelect::getAttribute()

Parameters

$key

Returns

mixednull

Retrieve all attributes at once

getAttributes() : array | \Traversable
Inherited

inherited_from \Zend\Form\Element::getAttributes()
inherited_from \Zend\Form\Element\MonthSelect::getAttributes()

Returns

array\Traversable

Get the day attributes

getDayAttributes() : array

Returns

array

getDayElement()

getDayElement() : \Zend\Form\Element\Select

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

getInputSpecification() : array

Returns

array

Retrieve the label used for this element

getLabel() : null | string
Inherited

inherited_from \Zend\Form\Element::getLabel()
inherited_from \Zend\Form\Element\MonthSelect::getLabel()

Returns

nullstring

Get the attributes to use with the label

getLabelAttributes() : array
Inherited

inherited_from \Zend\Form\Element::getLabelAttributes()
inherited_from \Zend\Form\Element\MonthSelect::getLabelAttributes()

Returns

array

Retrieve a single label option

getLabelOption($key) : mixed | null
Inherited

inherited_from \Zend\Form\Element::getLabelOption()
inherited_from \Zend\Form\Element\MonthSelect::getLabelOption()

Parameters

$key

Returns

mixednull

Get label specific options

getLabelOptions() : array
Inherited

inherited_from \Zend\Form\Element::getLabelOptions()
inherited_from \Zend\Form\Element\MonthSelect::getLabelOptions()

Returns

array

getMaxYear()

getMaxYear() : int
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getMaxYear()

Returns

int

Get validation error messages, if any.

getMessages() : array | \Traversable
Inherited

Returns a list of validation failure messages, if any.

inherited_from \Zend\Form\Element::getMessages()
inherited_from \Zend\Form\Element\MonthSelect::getMessages()

Returns

array\Traversable

getMinYear()

getMinYear() : int
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getMinYear()

Returns

int

Get the month attributes

getMonthAttributes() : array
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getMonthAttributes()

Returns

array

getMonthElement()

getMonthElement() : \Zend\Form\Element\Select
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getMonthElement()

Returns

Get value for name

getName() : string | int
Inherited

inherited_from \Zend\Form\Element::getName()
inherited_from \Zend\Form\Element\MonthSelect::getName()

Returns

stringint

Return the specified option

getOption(string $option) : NULL | mixed
Inherited

inherited_from \Zend\Form\Element::getOption()
inherited_from \Zend\Form\Element\MonthSelect::getOption()

Parameters

$option

string

Returns

NULLmixed

Get defined options

getOptions() : array
Inherited

inherited_from \Zend\Form\Element::getOptions()
inherited_from \Zend\Form\Element\MonthSelect::getOptions()

Returns

array

Retrieve the element value

getValue() : String

Returns

String

Get the year attributes

getYearAttributes() : array
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getYearAttributes()

Returns

array

getYearElement()

getYearElement() : \Zend\Form\Element\Select
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getYearElement()

Returns

Does the element has a specific attribute ?

hasAttribute(string $key) : bool
Inherited

inherited_from \Zend\Form\Element::hasAttribute()
inherited_from \Zend\Form\Element\MonthSelect::hasAttribute()

Parameters

$key

string

Returns

bool

Does the element has a specific label option ?

hasLabelOption(string $key) : bool
Inherited

inherited_from \Zend\Form\Element::hasLabelOption()
inherited_from \Zend\Form\Element\MonthSelect::hasLabelOption()

Parameters

$key

string

Returns

bool

This function is automatically called when creating element with factory.

init() : void
Inherited

It allows to perform various operations (add elements...)

inherited_from \Zend\Form\Element::init()
inherited_from \Zend\Form\Element\MonthSelect::init()

Prepare the form element (mostly used for rendering purposes)

prepareElement(\Zend\Form\FormInterface $form) : mixed

Parameters

Returns

mixed

Remove a single attribute

removeAttribute(string $key) : \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::removeAttribute()
inherited_from \Zend\Form\Element\MonthSelect::removeAttribute()

Parameters

$key

string

Returns

Remove many attributes at once

removeAttributes(array $keys) : \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::removeAttributes()
inherited_from \Zend\Form\Element\MonthSelect::removeAttributes()

Parameters

$keys

array

Returns

Remove a single label option

removeLabelOption(string $key) : \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::removeLabelOption()
inherited_from \Zend\Form\Element\MonthSelect::removeLabelOption()

Parameters

$key

string

Returns

Remove many attributes at once

removeLabelOptions(array $keys) : \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::removeLabelOptions()
inherited_from \Zend\Form\Element\MonthSelect::removeLabelOptions()

Parameters

$keys

array

Returns

Set a single element attribute

setAttribute(string $key, mixed $value) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setAttribute()
inherited_from \Zend\Form\Element\MonthSelect::setAttribute()

Parameters

$key

string

$value

mixed

Returns

Set many attributes at once

setAttributes(array | \Traversable $arrayOrTraversable) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

Implementation will decide if this will overwrite or merge.

inherited_from \Zend\Form\Element::setAttributes()
inherited_from \Zend\Form\Element\MonthSelect::setAttributes()

Parameters

$arrayOrTraversable

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the day attributes

setDayAttributes(array $dayAttributes) : \Zend\Form\Element\DateSelect

Parameters

$dayAttributes

array

Returns

Set the label used for this element

setLabel($label) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabel()
inherited_from \Zend\Form\Element\MonthSelect::setLabel()

Parameters

$label

Returns

Set the attributes to use with the label

setLabelAttributes(array $labelAttributes) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabelAttributes()
inherited_from \Zend\Form\Element\MonthSelect::setLabelAttributes()

Parameters

$labelAttributes

array

Returns

Set a single label optionn

setLabelOption(string $key, mixed $value) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabelOption()
inherited_from \Zend\Form\Element\MonthSelect::setLabelOption()

Parameters

$key

string

$value

mixed

Returns

Set many label options at once

setLabelOptions(array | \Traversable $arrayOrTraversable) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

Implementation will decide if this will overwrite or merge.

inherited_from \Zend\Form\Element::setLabelOptions()
inherited_from \Zend\Form\Element\MonthSelect::setLabelOptions()

Parameters

$arrayOrTraversable

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

setMaxYear()

setMaxYear(int $maxYear) : \Zend\Form\Element\MonthSelect
Inherited

inherited_from \Zend\Form\Element\MonthSelect::setMaxYear()

Parameters

$maxYear

int

Returns

Set a list of messages to report when validation fails

setMessages(array | \Traversable $messages) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setMessages()
inherited_from \Zend\Form\Element\MonthSelect::setMessages()

Parameters

$messages

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

setMinYear()

setMinYear(int $minYear) : \Zend\Form\Element\MonthSelect
Inherited

inherited_from \Zend\Form\Element\MonthSelect::setMinYear()

Parameters

$minYear

int

Returns

Set the month attributes

setMonthAttributes(array $monthAttributes) : \Zend\Form\Element\MonthSelect
Inherited

inherited_from \Zend\Form\Element\MonthSelect::setMonthAttributes()

Parameters

$monthAttributes

array

Returns

Set value for name

setName(string $name) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

In most cases, this will proxy to the attributes for storage, but is present to indicate that elements are generally named.

inherited_from \Zend\Form\Element::setName()
inherited_from \Zend\Form\Element\MonthSelect::setName()

Parameters

$name

string

Returns

Set a single option for an element

setOption(string $key, mixed $value) : \Zend\Form\self
Inherited

inherited_from \Zend\Form\Element::setOption()
inherited_from \Zend\Form\Element\MonthSelect::setOption()

Parameters

$key

string

$value

mixed

Returns

\Zend\Form\self

Accepted options for DateSelect (plus the ones from MonthSelect) : - day_attributes: HTML attributes to be rendered with the day element

setOptions(array | \Traversable $options) : \Zend\Form\Element\DateSelect

Accepted options are: - label: label to associate with the element - label_attributes: attributes to use when the label is rendered - label_options: label specific options

Parameters

$options

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

setShouldCreateEmptyOption()

setShouldCreateEmptyOption(bool $createEmptyOption) : \Zend\Form\Element\MonthSelect
Inherited

inherited_from \Zend\Form\Element\MonthSelect::setShouldCreateEmptyOption()

Parameters

$createEmptyOption

bool

Returns

setShouldRenderDelimiters()

setShouldRenderDelimiters(bool $renderDelimiters) : \Zend\Form\Element\MonthSelect
Inherited

inherited_from \Zend\Form\Element\MonthSelect::setShouldRenderDelimiters()

Parameters

$renderDelimiters

bool

Returns

Set the element value

setValue(string | array | \ArrayAccess | \DateTime $value) : \Zend\Form\Element\self

Parameters

$value

stringarray\ArrayAccess\DateTime

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

\Zend\Form\Element\selfProvides a fluent interface

Set the year attributes

setYearAttributes(array $yearAttributes) : \Zend\Form\Element\MonthSelect
Inherited

inherited_from \Zend\Form\Element\MonthSelect::setYearAttributes()

Parameters

$yearAttributes

array

Returns

shouldCreateEmptyOption()

shouldCreateEmptyOption() : bool
Inherited

inherited_from \Zend\Form\Element\MonthSelect::shouldCreateEmptyOption()

Returns

bool

shouldRenderDelimiters()

shouldRenderDelimiters() : bool
Inherited

inherited_from \Zend\Form\Element\MonthSelect::shouldRenderDelimiters()

Returns

bool

 Properties

 

$attributes

$attributes : array
Inherited

inherited_from \Zend\Form\Element::$$attributes
inherited_from \Zend\Form\Element\MonthSelect::$$attributes
 

If set to true, it will generate an empty option for every select (this is mainly needed by most JavaScript libraries to allow to have a placeholder)

$createEmptyOption : bool
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$createEmptyOption
 

Select form element that contains values for day

$dayElement : \Zend\Form\Element\Select

 

$label

$label : null | string
Inherited

inherited_from \Zend\Form\Element::$$label
inherited_from \Zend\Form\Element\MonthSelect::$$label
 

$labelAttributes

$labelAttributes : array
Inherited

inherited_from \Zend\Form\Element::$$labelAttributes
inherited_from \Zend\Form\Element\MonthSelect::$$labelAttributes
 

Label specific options

$labelOptions : array
Inherited

inherited_from \Zend\Form\Element::$$labelOptions
inherited_from \Zend\Form\Element\MonthSelect::$$labelOptions
 

Max year to use for the select (default: current year)

$maxYear : int
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$maxYear
 

<p>Validation error messages</p>

$messages : array
Inherited

inherited_from \Zend\Form\Element::$$messages
inherited_from \Zend\Form\Element\MonthSelect::$$messages
 

Min year to use for the select (default: current year - 100)

$minYear : int
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$minYear
 

Select form element that contains values for month

$monthElement : \Zend\Form\Element\Select
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$monthElement
 

<p>custom options</p>

$options : array
Inherited

inherited_from \Zend\Form\Element::$$options
inherited_from \Zend\Form\Element\MonthSelect::$$options
 

If set to true, view helpers will render delimiters between <select> elements, according to the specified locale

$renderDelimiters : bool
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$renderDelimiters
 

$validator

$validator : \Zend\Validator\ValidatorInterface
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$validator
 

$value

$value : mixed
Inherited

inherited_from \Zend\Form\Element::$$value
inherited_from \Zend\Form\Element\MonthSelect::$$value
 

Select form element that contains values for year

$yearElement : \Zend\Form\Element\Select
Inherited

inherited_from \Zend\Form\Element\MonthSelect::$$yearElement