|
|
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.
|
| |
◆ __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: