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 )
|
|
static | parseOptionsMessage (string $msg) |
| Parse labels and values out of a comma- and colon-separated list of options, such as is used for expiry and duration lists.
|
|
Class for generating HTML <select> or <datalist> elements.
Definition at line 28 of file XmlSelect.php.
◆ __construct()
XmlSelect::__construct |
( |
| $name = false, |
|
|
| $id = false, |
|
|
| $default = false ) |
◆ addOption()
XmlSelect::addOption |
( |
| $label, |
|
|
| $value = false ) |
- Parameters
-
string | $label | |
string | int | float | false | $value | If not given, assumed equal to $label |
Definition at line 82 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 94 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 107 of file XmlSelect.php.
References $default, and $options.
◆ getAttribute()
XmlSelect::getAttribute |
( |
| $name | ) |
|
- Parameters
-
- Returns
- string|int|null
Definition at line 74 of file XmlSelect.php.
◆ getHTML()
◆ parseOptionsMessage()
static XmlSelect::parseOptionsMessage |
( |
string | $msg | ) |
|
|
static |
◆ 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: