441. Class

441.1. Zend\Form\Element\Select

@copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)

441.1.1. Methods

441.1.1.1. getValueOptions

getValueOptions()

@return array

441.1.1.2. setValueOptions

setValueOptions()

@param array $options

Return type:Select

441.1.1.3. setOptions

setOptions()

Set options for an element. Accepted options are: - label: label to associate with the element - label_attributes: attributes to use when the label is rendered - value_options: list of values and labels for the select options _ empty_option: should an empty option be prepended to the options ?

Parameters:array|Traversable
Return type:Select|ElementInterface
Throws :InvalidArgumentException

441.1.1.4. setAttribute

setAttribute()

Set a single element attribute

Parameters:
  • string
  • mixed
Return type:

Select|ElementInterface

441.1.1.5. setEmptyOption

setEmptyOption()

Set the string for an empty option (can be empty string). If set to null, no option will be added

Parameters:string|null
Return type:Select

441.1.1.6. getEmptyOption

getEmptyOption()

Return the string for the empty option (null if none)

Return type:string|null

441.1.1.7. getValidator

getValidator()

Get validator

Return type:ZendValidatorValidatorInterface

441.1.1.8. getInputSpecification

getInputSpecification()

Provide default input rules for this element

Attaches the captcha as a validator.

Return type:array

441.1.1.9. getValueOptionsValues

getValueOptionsValues()

Get only the values from the options attribute

Return type:array

441.1.1.10. getOptionValue

getOptionValue()