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|false $prompt)

Sets first prompt item in select box.

string|object|false
getPrompt()

Returns first prompt item?

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

Sets items from which to choose.

Html|string
getControl()

Generates control's HTML element.

addOptionAttributes(array $attributes)

No description

setOptionAttribute(string $name, $value = true)

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|false $prompt)

Sets first prompt item in select box.

Parameters

string|object|false $prompt

Return Value

SelectBox

at line 61
string|object|false getPrompt()

Returns first prompt item?

Return Value

string|object|false

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

Sets items from which to choose.

Parameters

array $items
bool $useKeys

Return Value

ChoiceControl

at line 92
Html|string getControl()

Generates control's HTML element.

Return Value

Html|string

at line 110
SelectBox addOptionAttributes(array $attributes)

Parameters

array $attributes

Return Value

SelectBox

at line 118
SelectBox setOptionAttribute(string $name, $value = true)

Parameters

string $name
$value

Return Value

SelectBox

at line 125
bool isOk()

Return Value

bool

at line 135
array getOptionAttributes()

Return Value

array