A single-select combobox widget that is functionally similar to an HTML select element.
More...
|
string | $label |
| The combobox label.
|
|
array | $labelattributes = [] |
| Button label's attributes.
|
|
string | $name |
| Name of the combobox element.
|
|
array | $options |
| List of options.
|
|
string null | $selected |
| The value of the preselected option.
|
|
A single-select combobox widget that is functionally similar to an HTML select element.
- Copyright
- 2022 Shamim Rezaie shami.nosp@m.m@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core\output\select_menu::__construct |
( |
string | $name, |
|
|
array | $options, |
|
|
string | $selected = null ) |
select_menu constructor.
- Parameters
-
string | $name | Name of the combobox element |
array | $options | List of options in an associative array format like ['val' => 'Option']. Supports grouped options as well. |
string | null | $selected | The value of the preselected option. |
◆ export_for_template()
core\output\select_menu::export_for_template |
( |
renderer_base | $output | ) |
|
Export for template.
- Parameters
-
- Return values
-
Implements templatable.
◆ flatten_options()
core\output\select_menu::flatten_options |
( |
| ) |
|
|
protected |
Flatten the options for Mustache.
- Return values
-
◆ set_label()
core\output\select_menu::set_label |
( |
string | $label, |
|
|
array | $attributes = [] ) |
Sets the select menu's label.
- Parameters
-
string | $label | The label. |
array | $attributes | List of attributes to apply on the label element. |
The documentation for this class was generated from the following file: