Class for generating HTML <select> or <datalist> elements.
More...
|
static | formatOptions ( $options, $default=false) |
| This accepts an array of form: label => value label => ( label => value, label => value ) More...
|
|
Class for generating HTML <select> or <datalist> elements.
Definition at line 26 of file XmlSelect.php.
◆ __construct()
XmlSelect::__construct |
( |
|
$name = false , |
|
|
|
$id = false , |
|
|
|
$default = false |
|
) |
| |
◆ addOption()
XmlSelect::addOption |
( |
|
$label, |
|
|
|
$value = false |
|
) |
| |
- Parameters
-
string | $label | |
string | false | $value | If not given, assumed equal to $label |
Definition at line 80 of file XmlSelect.php.
◆ addOptions()
XmlSelect::addOptions |
( |
|
$options | ) |
|
This accepts an array of form label => value label => ( label => value, label => value )
- Parameters
-
Definition at line 92 of file XmlSelect.php.
References $options.
◆ formatOptions()
static XmlSelect::formatOptions |
( |
|
$options, |
|
|
|
$default = false |
|
) |
| |
|
static |
This accepts an array of form: label => value label => ( label => value, label => value )
- Parameters
-
array | $options | |
string | array | false | $default | |
- Returns
- string
Definition at line 105 of file XmlSelect.php.
References $default, $options, and Xml\option().
Referenced by getHTML().
◆ getAttribute()
XmlSelect::getAttribute |
( |
|
$name | ) |
|
◆ getHTML()
◆ setAttribute()
XmlSelect::setAttribute |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
◆ setDefault()
XmlSelect::setDefault |
( |
|
$default | ) |
|
◆ setTagName()
XmlSelect::setTagName |
( |
|
$tagName | ) |
|
◆ $attributes
XmlSelect::$attributes = [] |
|
protected |
◆ $default
XmlSelect::$default = false |
|
protected |
◆ $options
◆ $tagName
XmlSelect::$tagName = 'select' |
|
protected |
The documentation for this class was generated from the following file: