ChoiceControl
abstract class ChoiceControl extends BaseControl
Choice control that allows single item selection.
Properties
protected bool[] | $disabledItems | ||
array | $items | ||
mixed read-only | $selectedItem |
Methods
__construct($label = null, array|null $items = null)
No description
void
loadHttpData()
Loads HTTP data.
mixed
getValue()
Returns selected key.
string|int|null
getRawValue()
Returns selected key (not checked).
bool
isFilled()
Is any item selected?
setItems(array $items, bool $useKeys = true)
Sets items from which to choose.
array
getItems()
Returns items from which to choose.
mixed
getSelectedItem()
Returns selected value.
setDisabled(bool|array $value = true)
Disables or enables control or items.
checkDefaultValue(bool $value = true)
No description
Details
at line 29
__construct($label = null, array|null $items = null)
No description
at line 38
void
loadHttpData()
Loads HTTP data.
at line 54
Control
setValue(mixed $value)
internal |
Sets selected item (by key).
at line 78
mixed
getValue()
Returns selected key.
at line 89
string|int|null
getRawValue()
Returns selected key (not checked).
at line 98
bool
isFilled()
Is any item selected?
at line 107
ChoiceControl
setItems(array $items, bool $useKeys = true)
Sets items from which to choose.
at line 117
array
getItems()
Returns items from which to choose.
at line 126
mixed
getSelectedItem()
Returns selected value.
at line 136
BaseControl
setDisabled(bool|array $value = true)
Disables or enables control or items.
at line 153
ChoiceControl
checkDefaultValue(bool $value = true)
No description