946. Class

946.1. Zend\Form\View\Helper\FormSelect

946.1.1. Methods

946.1.1.1. render

render()

Render a form <select> element from the provided $element

Parameters:ElementInterface
Throws ExceptionInvalidArgumentException:
 
Throws ExceptionDomainException:
 
Return type:string

946.1.1.2. renderOptions

renderOptions()

Render an array of options

Individual options should be of the form:

<code> array(

‘value’ => ‘value’, ‘label’ => ‘label’, ‘disabled’ => $booleanFlag, ‘selected’ => $booleanFlag,

) </code>

Parameters:
  • array
  • array – Option values that should be marked as selected
Return type:

string

946.1.1.3. renderOptgroup

renderOptgroup()

Render an optgroup

See {@link renderOptions()} for the options specification. Basically, an optgroup is simply an option that has an additional “options” key with an array following the specification for renderOptions().

Parameters:
  • array
  • array
Return type:

string

946.1.1.4. __invoke

__invoke()

Invoke helper as functor

Proxies to {@link render()}.

Parameters:ElementInterface|null
Return type:string|FormSelect

946.1.1.5. validateMultiValue

validateMultiValue()

Ensure that the value is set appropriately

If the element’s value attribute is an array, but there is no multiple attribute, or that attribute does not evaluate to true, then we have a domain issue – you cannot have multiple options selected unless the multiple attribute is present and enabled.

Parameters:
  • mixed
  • array
Return type:

array

Throws :

ExceptionDomainException

Project Versions

Table Of Contents

Previous topic

945. Class

Next topic

947. Class

This Page