abstract class MultiChoiceControl extends BaseControl

Choice control that allows multiple items selection.

Properties

protected bool[] $disabledChoices
array $items
array read-only $selectedItems

Methods

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

No description

void
loadHttpData()

Loads HTTP data.

setValue($values)

Sets selected items (by keys).

mixed
getValue()

Returns selected keys.

array
getRawValue()

Returns selected keys (not checked).

setItems(array $items, bool $useKeys = true)

Sets items from which to choose.

array
getItems()

Returns items from which to choose.

array
getSelectedItems()

Returns selected values.

setDisabled(bool|array $value = true)

Disables or enables control or items.

string
getHtmlName()

Returns HTML name of control.

checkDefaultValue(bool $value = true)

No description

Details

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

No description

Parameters

$label
array|null $items

at line 41
void loadHttpData()

Loads HTTP data.

Return Value

void

at line 51
Control setValue($values)

internal  
 

Sets selected items (by keys).

Parameters

$values

Return Value

Control

at line 85
mixed getValue()

Returns selected keys.

Return Value

mixed

at line 94
array getRawValue()

Returns selected keys (not checked).

Return Value

array

at line 103
MultiChoiceControl setItems(array $items, bool $useKeys = true)

Sets items from which to choose.

Parameters

array $items
bool $useKeys

Return Value

MultiChoiceControl

at line 116
array getItems()

Returns items from which to choose.

Return Value

array

at line 125
array getSelectedItems()

Returns selected values.

Return Value

array

at line 136
BaseControl setDisabled(bool|array $value = true)

Disables or enables control or items.

Parameters

bool|array $value

Return Value

BaseControl

at line 150
string getHtmlName()

Returns HTML name of control.

Return Value

string

at line 156
MultiChoiceControl checkDefaultValue(bool $value = true)

No description

Parameters

bool $value

Return Value

MultiChoiceControl