SelectBox
class SelectBox extends ChoiceControl
Select box control that allows single item selection.
Constants
| Valid |
validation rule |
| VALID |
|
Methods
No description
Returns first prompt item.
Sets options and option groups from which to choose.
No description
No description
Sets an attribute on all
Checks whether the current selection is valid (a non-prompt item is selected, or the control has a prompt/is disabled).
Returns all option attributes.
Details
at line 35
__construct(string|Stringable|null $label = null, array|null $items = null)
No description
at line 50
SelectBox
setPrompt(string|Stringable|false $prompt)
Sets first prompt item in select box.
at line 60
string|Stringable|false
getPrompt()
Returns first prompt item.
at line 70
ChoiceControl
setItems(array $items, bool $useKeys = true)
Sets options and option groups from which to choose.
at line 93
Html
getControl()
No description
at line 125
SelectBox
addOptionAttributes(array $attributes)
No description
at line 137
SelectBox
setOptionAttribute(string $name, mixed $value = true)
Sets an attribute on all
at line 147
bool
isOk()
Checks whether the current selection is valid (a non-prompt item is selected, or the control has a prompt/is disabled).
at line 161
array
getOptionAttributes()
Returns all option attributes.