class SelectBox extends ChoiceControl

Select box control that allows single item selection.

Constants

Valid

validation rule

VALID

Methods

__construct($label = null, array|null $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 options and option groups 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 34
__construct($label = null, array|null $items = null)

No description

Parameters

$label
array|null $items

at line 51
SelectBox setPrompt(string|object|false $prompt)

Sets first prompt item in select box.

Parameters

string|object|false $prompt

Return Value

SelectBox

at line 62
string|object|false getPrompt()

Returns first prompt item?

Return Value

string|object|false

at line 72
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 113
SelectBox addOptionAttributes(array $attributes)

No description

Parameters

array $attributes

Return Value

SelectBox

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

No description

Parameters

string $name
$value

Return Value

SelectBox

at line 128
bool isOk()

No description

Return Value

bool

at line 138
array getOptionAttributes()

No description

Return Value

array