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 hour, minute and second select elements

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()
inherited_from \Zend\Form\Element\DateSelect::clearAttributes()

Returns

Retrieve a single element attribute

getAttribute($key) : mixed | null
Inherited

inherited_from \Zend\Form\Element::getAttribute()
inherited_from \Zend\Form\Element\MonthSelect::getAttribute()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::getAttributes()

Returns

array\Traversable

Get the day attributes

getDayAttributes() : array
Inherited

inherited_from \Zend\Form\Element\DateSelect::getDayAttributes()

Returns

array

getDayElement()

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

inherited_from \Zend\Form\Element\DateSelect::getDayElement()

Returns

Get the hour attributes

getHourAttributes() : array

Returns

array

getHourElement()

getHourElement() : \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() : string
Inherited

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

Returns

string

Get the attributes to use with the label

getLabelAttributes() : array
Inherited

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

Returns

array

getMaxYear()

getMaxYear() : int
Inherited

inherited_from \Zend\Form\Element\MonthSelect::getMaxYear()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::getMessages()

Returns

array\Traversable

getMinYear()

getMinYear() : int
Inherited

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

Returns

int

Get the minute attributes

getMinuteAttributes() : array

Returns

array

getMinuteElement()

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

Get the month attributes

getMonthAttributes() : array
Inherited

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

Returns

array

getMonthElement()

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

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

Returns

Get value for name

getName() : string | int
Inherited

inherited_from \Zend\Form\Element::getName()
inherited_from \Zend\Form\Element\MonthSelect::getName()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::getOptions()

Returns

array

Get the second attributes

getSecondAttributes() : array

Returns

array

getSecondElement()

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

Retrieve the element value

getValue() : mixed
Inherited

inherited_from \Zend\Form\Element::getValue()
inherited_from \Zend\Form\Element\MonthSelect::getValue()
inherited_from \Zend\Form\Element\DateSelect::getValue()

Returns

mixed

Get the year attributes

getYearAttributes() : array
Inherited

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

Returns

array

getYearElement()

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

inherited_from \Zend\Form\Element\MonthSelect::getYearElement()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::hasAttribute()

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()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::removeAttributes()

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()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::setAttributes()

Parameters

$arrayOrTraversable

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the day attributes

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

inherited_from \Zend\Form\Element\DateSelect::setDayAttributes()

Parameters

$dayAttributes

array

Returns

Set the hour attributes

setHourAttributes(array $hourAttributes) : \Zend\Form\Element\DateSelect

Parameters

$hourAttributes

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()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::setLabelAttributes()

Parameters

$labelAttributes

array

Returns

setMaxYear()

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

inherited_from \Zend\Form\Element\MonthSelect::setMaxYear()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::setMinYear()

Parameters

$minYear

int

Returns

Set the minute attributes

setMinuteAttributes(array $minuteAttributes) : \Zend\Form\Element\DateSelect

Parameters

$minuteAttributes

array

Returns

Set the month attributes

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

inherited_from \Zend\Form\Element\MonthSelect::setMonthAttributes()
inherited_from \Zend\Form\Element\DateSelect::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()
inherited_from \Zend\Form\Element\DateSelect::setName()

Parameters

$name

string

Returns

Accepted options for DateTimeSelect (plus the ones from DateSelect) : - hour_attributes: HTML attributes to be rendered with the hour element - minute_attributes: HTML attributes to be rendered with the minute element - second_attributes: HTML attributes to be rendered with the second element - should_show_seconds: if set to true, the seconds select is shown

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

Parameters

$options

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the second attributes

setSecondAttributes(array $secondAttributes) : \Zend\Form\Element\DateSelect

Parameters

$secondAttributes

array

Returns

setShouldCreateEmptyOption()

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

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

Parameters

$createEmptyOption

bool

Returns

setShouldRenderDelimiters()

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

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

Parameters

$renderDelimiters

bool

Returns

If set to true, this indicate that the second select is shown.

setShouldShowSeconds(bool $shouldShowSeconds) : \Zend\Form\Element\DateTimeSelect

If set to true, the seconds will be assumed to always be 00

Parameters

$shouldShowSeconds

bool

Returns

Set the element value

setValue(mixed $value) : void | \Zend\Form\Element

Parameters

$value

mixed

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the year attributes

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

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

Parameters

$yearAttributes

array

Returns

shouldCreateEmptyOption()

shouldCreateEmptyOption() : bool
Inherited

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

Returns

bool

shouldRenderDelimiters()

shouldRenderDelimiters() : bool
Inherited

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

Returns

bool

shouldShowSeconds()

shouldShowSeconds() : bool

Returns

bool

 Properties

 

$attributes

$attributes : array
Inherited

inherited_from \Zend\Form\Element::$$attributes
inherited_from \Zend\Form\Element\MonthSelect::$$attributes
inherited_from \Zend\Form\Element\DateSelect::$$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
inherited_from \Zend\Form\Element\DateSelect::$$createEmptyOption
 

Select form element that contains values for day

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

inherited_from \Zend\Form\Element\DateSelect::$$dayElement
 

Select form element that contains values for hour

$hourElement : \Zend\Form\Element\Select

 

$label

$label : string
Inherited

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

$labelAttributes

$labelAttributes : array
Inherited

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

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

$maxYear : int
Inherited

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

<p>Validation error messages</p>

$messages : array
Inherited

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

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

$minYear : int
Inherited

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

Select form element that contains values for minute

$minuteElement : \Zend\Form\Element\Select

 

Select form element that contains values for month

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

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

<p>custom options</p>

$options : array
Inherited

inherited_from \Zend\Form\Element::$$options
inherited_from \Zend\Form\Element\MonthSelect::$$options
inherited_from \Zend\Form\Element\DateSelect::$$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
inherited_from \Zend\Form\Element\DateSelect::$$renderDelimiters
 

Select form element that contains values for second

$secondElement : \Zend\Form\Element\Select

 

Is the seconds select shown when the element is rendered?

$shouldShowSeconds : bool

 

$validator

$validator : \Zend\Validator\ValidatorInterface
Inherited

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

$value

$value : mixed
Inherited

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

Select form element that contains values for year

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

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