435. Class

435.1. Zend\Form\Element\MonthSelect

435.1.1. Methods

435.1.1.1. __construct

__construct()

Constructor. Add two selects elements

Parameters:
  • null|int|string – Optional name for the element
  • array – Optional options for the element

435.1.1.2. setOptions

setOptions()

Accepted options for DateSelect: - month_attributes: HTML attributes to be rendered with the month element - year_attributes: HTML attributes to be rendered with the month element - min_year: min year to use in the year select - max_year: max year to use in the year select

Parameters:array|Traversable
Return type:MonthSelect

435.1.1.3. getMonthElement

getMonthElement()

@return Select

435.1.1.4. getYearElement

getYearElement()

@return Select

435.1.1.5. setMonthAttributes

setMonthAttributes()

Set the month attributes

Parameters:array
Return type:MonthSelect

435.1.1.6. getMonthAttributes

getMonthAttributes()

Get the month attributes

Return type:array

435.1.1.7. setYearAttributes

setYearAttributes()

Set the year attributes

Parameters:array
Return type:MonthSelect

435.1.1.8. getYearAttributes

getYearAttributes()

Get the year attributes

Return type:array

435.1.1.9. setMinYear

setMinYear()

@param int $minYear

Return type:MonthSelect

435.1.1.10. getMinYear

getMinYear()

@return int

435.1.1.11. setMaxYear

setMaxYear()

@param int $maxYear

Return type:MonthSelect

435.1.1.12. getMaxYear

getMaxYear()

@return int

435.1.1.13. setShouldCreateEmptyOption

setShouldCreateEmptyOption()

@param bool $createEmptyOption

Return type:MonthSelect

435.1.1.14. shouldCreateEmptyOption

shouldCreateEmptyOption()

@return bool

435.1.1.15. setValue

setValue()

@param mixed $value

Return type:void|ZendFormElement

435.1.1.16. prepareElement

prepareElement()

Prepare the form element (mostly used for rendering purposes)

Parameters:FormInterface
Return type:mixed

435.1.1.17. getValidator

getValidator()

Get validator

Return type:ValidatorInterface

435.1.1.18. getInputSpecification

getInputSpecification()

Should return an array specification compatible with {@link ZendInputFilterFactory::createInput()}.

Return type:array

435.1.1.19. __clone

__clone()

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