abstract class ChoiceControl extends BaseControl

Choice control that allows single item selection.

Properties

bool deprecated $checkAllowedValues
array $items
mixed read-only $selectedItem

Methods

__construct($label = null, array $items = null)

No description

void
loadHttpData()

Loads HTTP data.

setValue($value)

Sets selected item (by key).

mixed
getValue()

Returns selected key.

string|int
getRawValue()

Returns selected key (not checked).

bool
isFilled()

Is any item selected?

setItems(array $items, $useKeys = true)

Sets items from which to choose.

array
getItems()

Returns items from which to choose.

mixed
getSelectedItem()

Returns selected value.

setDisabled($value = true)

Disables or enables control or items.

checkDefaultValue($value = true)

No description

Details

at line 31
__construct($label = null, array $items = null)

No description

Parameters

$label
array $items

at line 44
void loadHttpData()

Loads HTTP data.

Return Value

void

at line 63
IControl setValue($value)

internal  
 

Sets selected item (by key).

Parameters

$value

Return Value

IControl

at line 78
mixed getValue()

Returns selected key.

Return Value

mixed

at line 88
string|int getRawValue()

Returns selected key (not checked).

Return Value

string|int

at line 98
bool isFilled()

Is any item selected?

Return Value

bool

at line 110
ChoiceControl setItems(array $items, $useKeys = true)

Sets items from which to choose.

Parameters

array $items
$useKeys

Return Value

ChoiceControl

at line 121
array getItems()

Returns items from which to choose.

Return Value

array

at line 131
mixed getSelectedItem()

Returns selected value.

Return Value

mixed

at line 143
BaseControl setDisabled($value = true)

Disables or enables control or items.

Parameters

$value

Return Value

BaseControl

at line 161
ChoiceControl checkDefaultValue($value = true)

No description

Parameters

$value

Return Value

ChoiceControl