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
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
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() |
inherited_from |
\Zend\Form\Element\DateSelect::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() |
inherited_from |
\Zend\Form\Element\DateSelect::getAttribute() |
Parameters
$key
Returns
mixed
null
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 both the year and month elements
getElements() : array
Inherited
inherited_from |
\Zend\Form\Element\DateSelect::getElements() |
Returns
array
Get the hour attributes
getHourAttributes() : 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() |
inherited_from |
\Zend\Form\Element\DateSelect::getLabel() |
Returns
null
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
Retrieve a single label option
getLabelOption($key) : mixed | null
Inherited
inherited_from |
\Zend\Form\Element::getLabelOption() |
inherited_from |
\Zend\Form\Element\MonthSelect::getLabelOption() |
inherited_from |
\Zend\Form\Element\DateSelect::getLabelOption() |
Parameters
$key
Returns
mixed
null
Get label specific options
getLabelOptions() : array
Inherited
inherited_from |
\Zend\Form\Element::getLabelOptions() |
inherited_from |
\Zend\Form\Element\MonthSelect::getLabelOptions() |
inherited_from |
\Zend\Form\Element\DateSelect::getLabelOptions() |
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
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
string
int
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
NULL
mixed
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
Retrieve the element value
getValue() : string
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
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() |
inherited_from |
\Zend\Form\Element\DateSelect::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() |
inherited_from |
\Zend\Form\Element\DateSelect::init() |
Prepare the form element (mostly used for rendering purposes)
prepareElement(\Zend\Form\FormInterface $form) : void
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
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() |
inherited_from |
\Zend\Form\Element\DateSelect::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() |
inherited_from |
\Zend\Form\Element\DateSelect::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() |
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
Returns
Set the day attributes
setDayAttributes(array $dayAttributes) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\DateSelect::setDayAttributes() |
Parameters
$dayAttributes
array
Returns
\Zend\Form\Element\self
Set the hour attributes
setHourAttributes(array $hourAttributes) : \Zend\Form\Element\self
Parameters
$hourAttributes
array
Returns
\Zend\Form\Element\self
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
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() |
inherited_from |
\Zend\Form\Element\DateSelect::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() |
inherited_from |
\Zend\Form\Element\DateSelect::setLabelOptions() |
Parameters
$arrayOrTraversable
array\Traversable
Exceptions
Returns
setMaxYear()
setMaxYear(int $maxYear) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\MonthSelect::setMaxYear() |
inherited_from |
\Zend\Form\Element\DateSelect::setMaxYear() |
Parameters
$maxYear
int
Returns
\Zend\Form\Element\self
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
Returns
setMinYear()
setMinYear(int $minYear) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\MonthSelect::setMinYear() |
inherited_from |
\Zend\Form\Element\DateSelect::setMinYear() |
Parameters
$minYear
int
Returns
\Zend\Form\Element\self
Set the minute attributes
setMinuteAttributes(array $minuteAttributes) : \Zend\Form\Element\self
Parameters
$minuteAttributes
array
Returns
\Zend\Form\Element\self
Set the month attributes
setMonthAttributes(array $monthAttributes) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\MonthSelect::setMonthAttributes() |
inherited_from |
\Zend\Form\Element\DateSelect::setMonthAttributes() |
Parameters
$monthAttributes
array
Returns
\Zend\Form\Element\self
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
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() |
inherited_from |
\Zend\Form\Element\DateSelect::setOption() |
Parameters
$key
string
$value
mixed
Returns
\Zend\Form\self
Set options for DateTimeSelect element.
setOptions(array | \Traversable $options) : \Zend\Form\Element\self
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
Parameters
$options
array\Traversable
Exceptions
Returns
\Zend\Form\Element\self
Set the second attributes
setSecondAttributes(array $secondAttributes) : \Zend\Form\Element\self
Parameters
$secondAttributes
array
Returns
\Zend\Form\Element\self
setShouldCreateEmptyOption()
setShouldCreateEmptyOption(bool $createEmptyOption) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\MonthSelect::setShouldCreateEmptyOption() |
inherited_from |
\Zend\Form\Element\DateSelect::setShouldCreateEmptyOption() |
Parameters
$createEmptyOption
bool
Returns
\Zend\Form\Element\self
setShouldRenderDelimiters()
setShouldRenderDelimiters(bool $renderDelimiters) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\MonthSelect::setShouldRenderDelimiters() |
inherited_from |
\Zend\Form\Element\DateSelect::setShouldRenderDelimiters() |
Parameters
$renderDelimiters
bool
Returns
\Zend\Form\Element\self
If set to true, this indicate that the second select is shown.
setShouldShowSeconds(bool $shouldShowSeconds) : \Zend\Form\Element\self
If set to true, the seconds will be
assumed to always be 00
Parameters
$shouldShowSeconds
bool
Returns
\Zend\Form\Element\self
Set the element value
setValue(mixed $value) : \Zend\Form\Element\self
Parameters
$value
mixed
Exceptions
Returns
\Zend\Form\Element\self
Set the year attributes
setYearAttributes(array $yearAttributes) : \Zend\Form\Element\self
Inherited
inherited_from |
\Zend\Form\Element\MonthSelect::setYearAttributes() |
inherited_from |
\Zend\Form\Element\DateSelect::setYearAttributes() |
Parameters
$yearAttributes
array
Returns
\Zend\Form\Element\self
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
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 |
$label
$label : null | 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 |
Label specific options
$labelOptions : array
Inherited
inherited_from |
\Zend\Form\Element::$$labelOptions |
inherited_from |
\Zend\Form\Element\MonthSelect::$$labelOptions |
inherited_from |
\Zend\Form\Element\DateSelect::$$labelOptions |
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 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 |
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 |