Class for generating HTML <select> or <datalist> elements.
More...
|
| static | formatOptions (array $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 16 of file XmlSelect.php.
◆ __construct()
| MediaWiki\Xml\XmlSelect::__construct |
( |
| $name = false, |
|
|
| $id = false, |
|
|
| $default = false ) |
◆ addOption()
| MediaWiki\Xml\XmlSelect::addOption |
( |
string | $label, |
|
|
| $value = false ) |
- Parameters
-
| string | $label | |
| string | int | float | array | false | $value | If not given, assumed equal to $label |
Definition at line 77 of file XmlSelect.php.
◆ addOptions()
| MediaWiki\Xml\XmlSelect::addOptions |
( |
array | $options | ) |
|
This accepts an array of form label => value label => ( label => value, label => value )
- Parameters
-
| array<string,string|int|float|array> | $options |
Definition at line 89 of file XmlSelect.php.
◆ formatOptions()
| static MediaWiki\Xml\XmlSelect::formatOptions |
( |
array | $options, |
|
|
| $default = false ) |
|
static |
This accepts an array of form: label => value label => ( label => value, label => value )
- Parameters
-
| array<string,string|int|float|array> | $options |
| string | int | float | array | false | $default | |
- Returns
- string HTML
Definition at line 102 of file XmlSelect.php.
◆ getAttribute()
| MediaWiki\Xml\XmlSelect::getAttribute |
( |
string | $name | ) |
|
- Parameters
-
- Returns
- string|int|null
Definition at line 69 of file XmlSelect.php.
◆ getHTML()
| MediaWiki\Xml\XmlSelect::getHTML |
( |
| ) |
|
◆ parseOptionsMessage()
| static MediaWiki\Xml\XmlSelect::parseOptionsMessage |
( |
string | $msg | ) |
|
|
static |
◆ setAttribute()
| MediaWiki\Xml\XmlSelect::setAttribute |
( |
string | $name, |
|
|
| $value ) |
◆ setDefault()
| MediaWiki\Xml\XmlSelect::setDefault |
( |
| $default | ) |
|
- Parameters
-
| string | int | float | array | $default | |
Definition at line 45 of file XmlSelect.php.
◆ setTagName()
| MediaWiki\Xml\XmlSelect::setTagName |
( |
string | $tagName | ) |
|
The documentation for this class was generated from the following file: