class SelectBox extends ChoiceControl

Select box control that allows single item selection.

Constants

VALID

validation rule

Methods

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

No description

setPrompt(string|object $prompt)

Sets first prompt item in select box.

mixed
getPrompt()

Returns first prompt item?

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

Sets options and option groups from which to choose.

Html|string
getControl()

Generates control's HTML element.

addOptionAttributes(array $attributes)

No description

bool
isOk()

No description

array
getOptionAttributes()

No description

Details

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

Parameters

$label
array $items

at line 50
SelectBox setPrompt(string|object $prompt)

Sets first prompt item in select box.

Parameters

string|object $prompt

Return Value

SelectBox

at line 61
mixed getPrompt()

Returns first prompt item?

Return Value

mixed

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

Sets options and option groups from which to choose.

Parameters

array $items
bool $useKeys

Return Value

ChoiceControl

at line 95
Html|string getControl()

Generates control's HTML element.

Return Value

Html|string

at line 115
SelectBox addOptionAttributes(array $attributes)

Parameters

array $attributes

Return Value

SelectBox

at line 122
bool isOk()

Return Value

bool

at line 132
array getOptionAttributes()

Return Value

array