Difference between revisions of "JHtmlSelect::option"
From Joomla! Documentation
(Updated to r1448:247ba8d88526) |
m (JoomlaWikiBot moved page JHtmlSelect::option/11.1 to API17:JHtmlSelect::option without leaving a redirect: Robot: Moved page) |
(No difference)
|
Revision as of 18:51, 10 May 2013
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JHtmlSelect::option[edit]
Description[edit]
Create an object that represents an option in an option list.
Template:Description:JHtmlSelect::option [Edit Descripton]
public static function option (
$value
$text= ''
$optKey= 'value'
$optText= 'text'
$disable=false
)
Parameter | Type | Default | Description |
---|---|---|---|
$value | string | The value of the option | |
$text | string | The text for the option | |
$optKey | array | 'value' | array. Additional attributes for this option. Defaults to none. disable: Boolean. If set, this option is disabled. label: String. The value for the option label. option.attr: The property in each option array to use for additional selection attributes. Defaults to none. option.disable: The property that will hold the disabled state. Defaults to "disable". option.key: The property that will hold the selection value. Defaults to "value". option.label: The property in each option array to use as the selection label attribute. If a "label" option is provided, defaults to "label", if no label is given, defaults to null (none). option.text: The property that will hold the the displayed text. Defaults to "text". If set to null, the option array is assumed to be a list of displayable scalars. |
$optText | string | 'text' | The property that will hold the the displayed text. This parameter is ignored if an options array is passed. |
$disable | false |
- Returns object
- Defined on line 400 of libraries/joomla/html/html/select.php
See also[edit]
- JHtmlSelect::option source code on BitBucket
- Class JHtmlSelect
- Subpackage Html
- Other versions of JHtmlSelect::option
Template:SeeAlso:JHtmlSelect::option [Edit See Also]
User contributed notes[edit]
<CodeExamplesForm />