RadioInput
class RadioInput extends ChoiceControl implements IValidationInput
Class RadioInput. Lets user choose one out of multiple options.
Traits
Properties
protected array | $rawItems | from ChoiceInputTrait |
Methods
Processes an associative array in a way that it has no nesting. Keys for nested arrays are lost, but nested arrays are merged.
Makes array of <option>. Can handle associative arrays just fine. Checks for duplicate values.
Check if a specific value is disabled. If whole control is disabled, returns false.
Modify control in such a way that it explicitly shows its validation state.
No description
Generates control's HTML element.
Details
in
ChoiceInputTrait
at line 35
array
flatAssocArray(array $array)
Processes an associative array in a way that it has no nesting. Keys for nested arrays are lost, but nested arrays are merged.
in
ChoiceInputTrait
at line 59
array
makeOptionList(array $items, callable $optionArgs, array $valuesRendered =
[])
Makes array of <option>. Can handle associative arrays just fine. Checks for duplicate values.
in
ChoiceInputTrait
at line 100
ChoiceInputTrait
setItems(array $items, bool $useKeys = TRUE)
in
ChoiceInputTrait
at line 117
protected bool
isControlDisabled()
Check if whole control is disabled.
This is false if only a set of values is disabled
in
ChoiceInputTrait
at line 131
protected bool
isValueDisabled($value)
Check if a specific value is disabled. If whole control is disabled, returns false.
in
ChoiceInputTrait
at line 149
protected bool
isValueSelected($value)
Self-explanatory
at line 107
Html
showValidation(
Html
$control)
Modify control in such a way that it explicitly shows its validation state.
Returns the modified element.
at line 41
__construct(string|object $label = NULL, array $items = NULL)
at line 53
Html
getControl()
Generates control's HTML element.