(no description)
File Size: | 172 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
select_menu:: (5 methods):
__construct()
set_label()
flatten_options()
get_selected_option()
export_for_template()
Class: select_menu - X-Ref
A single-select combobox widget that is functionally similar to an HTML select element.__construct(string $name, array $options, string $selected = null) X-Ref |
select_menu constructor. param: string $name Name of the combobox element param: array $options List of options in an associative array format like ['val' => 'Option']. param: string|null $selected The value of the preselected option. |
set_label(string $label, array $attributes = []) X-Ref |
Sets the select menu's label. param: string $label The label. param: array $attributes List of attributes to apply on the label element. |
flatten_options() X-Ref |
Flatten the options for Mustache. return: array |
get_selected_option() X-Ref |
Return the name of the selected option. return: string|null The name of the selected option or null. |
export_for_template(renderer_base $output) X-Ref |
Export for template. param: renderer_base $output The renderer. return: \stdClass |