Helper to generate "select" list of options
category | Zend |
---|---|
package | Zend_View |
subpackage | Helper |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_View_Helper_FormElement |
direct() : void
inherited_from | \Zend_View_Helper_Interface::direct() |
---|
formSelect(string|array $name, mixed $value= null
, array|string $attribs= null
, array $options= null
, string $listsep= "<br />\n"
) : string
access | public |
---|
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.
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).
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)
array
An array of key-value pairs where the array key is the radio value, and the array value is the radio text.
string
When disabled, use this list separator string between list values.
string
The select tag and options XHTML.getClosingBracket() : string
string
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
setTranslator(\Zend_Translate|\Zend_Translate_Adapter|null $translator = null
) : \Zend_View_Helper_FormElement
\Zend_Translate
\Zend_Translate_Adapter
null
\Zend_View_Helper_FormElement
setView(\Zend_View_Interface $view) : \Zend_View_Helper_Abstract
inherited_from | \Zend_View_Helper_Interface::setView() |
---|
\Zend_View_Interface
\Zend_View_Helper_Abstract
_build(string $value, string $label, array $selected, array|boolean $disable, array $optionClasses = array()
) : string
string
Options Value
string
Options Label
array
The option value(s) to mark as 'selected'
array
boolean
Whether the select is disabled, or individual options are
array
The classes to associate with each option value
string
Option Tag XHTML_getInfo($name, $value= null
, $attribs= null
, $options= null
, $listsep= null
) : array
E.g, formExample($name, $value, $attribs, $options, $listsep) is the same thing as formExample(array('name' => ...)).
Note that you cannot pass a 'disable' param; you need to pass it as an 'attribs' key.
access | protected |
---|
array
An element info array with keys for name, value,
attribs, options, listsep, disable, and escape._hidden(string $name, string $value= null
, array $attribs= null
) : string
We have this as a common method because other elements often need hidden elements for their operation.
access | protected |
---|
string
The element name.
string
The element value.
array
Attributes for the element.
string
A hidden element._htmlAttribs(array $attribs) : string
access | public |
---|
array
From this array, each key-value pair is converted to an attribute name and value.
string
The XHTML for the attributes._isHtml5() : boolean
boolean
_isStrictDoctype() : boolean
boolean
_isXhtml() : boolean
boolean
_normalizeId(string $value) : string
string
string
$view : \Zend_View_Interface
null
$_closingBracket : string
null
$_translator : \Zend_Translate_Adapter | null
EOL = "\n"