View/Helper/FormSelect.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_View
- Subpackage
- Helper
- Version
- $Id$
\Zend_View_Helper_FormSelect
- Parent(s)
- \Zend_View_Helper_FormElement < \Zend_View_Helper_HtmlElement < \Zend_View_Helper_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods

_build(string $value, string $label, array $selected, array | bool $disable, array $optionClasses = array()) : stringBuilds the actual
| Name | Type | Description |
|---|---|---|
| $value | string | Options Value |
| $label | string | Options Label |
| $selected | array | The option value(s) to mark as 'selected' |
| $disable | array | bool | Whether the select is disabled, or individual options are |
| $optionClasses | array | The classes to associate with each option value |
| Type | Description |
|---|---|
| string | Option Tag XHTML |

formSelect(string | array $name, mixed $value = null, array | string $attribs = null, array $options = null, string $listsep = "
\n") : stringGenerates 'select' list of options.
| Name | Type | Description |
|---|---|---|
| $name | string | array | If a string, the element name. If an array, all other parameters are ignored, and the array elements are extracted in place of added parameters. |
| $value | mixed | The option value to mark as 'selected'; if an array, will mark all values in the array as 'selected' (used for multiple-select elements). |
| $attribs | array | string | Attributes added to the 'select' tag. the optional 'optionClasses' attribute is used to add a class to the options within the select (associative array linking the option value to the desired class) |
| $options | array | An array of key-value pairs where the array key is the radio value, and the array value is the radio text. |
| $listsep | string | When disabled, use this list separator string between list values. |
| Type | Description |
|---|---|
| string | The select tag and options XHTML. |
- Access
- public