abstract class ChoiceControl extends BaseControl

Choice control that allows single item selection.

Properties

array $items
mixed read-only $selectedItem
mixed read-only $rawValue

Methods

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

No description

void
loadHttpData()

Loads HTTP data.

void
setValue($value)

Sets selected item (by key).

mixed
getValue()

Returns selected key.

scalar
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.

Details

at line 28
__construct($label = NULL, array $items = NULL)

No description

Parameters

$label
array $items

at line 41
void loadHttpData()

Loads HTTP data.

Return Value

void

at line 59
void setValue($value)

Sets selected item (by key).

Parameters

$value

Return Value

void

at line 74
mixed getValue()

Returns selected key.

Return Value

mixed

at line 84
scalar getRawValue()

Returns selected key (not checked).

Return Value

scalar

at line 94
bool isFilled()

Is any item selected?

Return Value

bool

at line 106
ChoiceControl setItems(array $items, $useKeys = TRUE)

Sets items from which to choose.

Parameters

array $items
$useKeys

Return Value

ChoiceControl

at line 117
array getItems()

Returns items from which to choose.

Return Value

array

at line 127
mixed getSelectedItem()

Returns selected value.

Return Value

mixed

at line 139
BaseControl setDisabled($value = TRUE)

Disables or enables control or items.

Parameters

$value

Return Value

BaseControl