|
MediaWiki
master
|
Class for generating HTML <select> or <datalist> elements. More...
Public Member Functions | |
| __construct ($name=false, $id=false, $default=false) | |
| addOption ($label, $value=false) | |
| addOptions ($options) | |
| This accepts an array of form label => value label => ( label => value, label => value ) More... | |
| getAttribute ($name) | |
| getHTML () | |
| setAttribute ($name, $value) | |
| setDefault ($default) | |
| setTagName ($tagName) | |
Static Public Member Functions | |
| static | formatOptions ($options, $default=false) |
| This accepts an array of form: label => value label => ( label => value, label => value ) More... | |
Protected Attributes | |
| $attributes = [] | |
| $default = false | |
| $options = [] | |
| $tagName = 'select' | |
Class for generating HTML <select> or <datalist> elements.
Definition at line 26 of file XmlSelect.php.
Definition at line 32 of file XmlSelect.php.
References $default, $name, and setAttribute().
| XmlSelect::addOption | ( | $label, | |
$value = false |
|||
| ) |
| string | $label | |
| string | $value | If not given, assumed equal to $label |
Definition at line 84 of file XmlSelect.php.
| XmlSelect::addOptions | ( | $options | ) |
This accepts an array of form label => value label => ( label => value, label => value )
| array | $options |
Definition at line 96 of file XmlSelect.php.
|
static |
This accepts an array of form: label => value label => ( label => value, label => value )
| array | $options | |
| string | array | $default |
Definition at line 109 of file XmlSelect.php.
References $default, $options, $value, as, Xml\option(), and Html\rawElement().
| XmlSelect::getAttribute | ( | $name | ) |
| string | $name |
Definition at line 72 of file XmlSelect.php.
References $name.
| XmlSelect::getHTML | ( | ) |
Definition at line 131 of file XmlSelect.php.
References $options, as, options(), and Html\rawElement().
| XmlSelect::setAttribute | ( | $name, | |
| $value | |||
| ) |
| string | $name | |
| string | $value |
Definition at line 64 of file XmlSelect.php.
Referenced by __construct().
| XmlSelect::setDefault | ( | $default | ) |
| XmlSelect::setTagName | ( | $tagName | ) |
|
protected |
Definition at line 30 of file XmlSelect.php.
|
protected |
Definition at line 28 of file XmlSelect.php.
Referenced by __construct(), formatOptions(), and setDefault().
|
protected |
Definition at line 27 of file XmlSelect.php.
Referenced by addOptions(), formatOptions(), and getHTML().
|
protected |
Definition at line 29 of file XmlSelect.php.
Referenced by setTagName().