Class SelectBox (namespace Nette\Forms)
Select box control that allows single item selection.
Object | --Component | --FormControl | --SelectBox
Direct Known Sub-classes:
| Public Method Summary | |
|---|---|
| SelectBox |
|
| bool |
areKeysUsed
()
Are the keys used?
|
| Html |
getControl
()
Generates control's HTML element.
|
| array |
getItems
()
Returns items from which to choose.
|
| mixed |
getRawValue
()
Returns selected item key (not checked).
|
| string |
Returns selected value.
|
| mixed |
getValue
()
Returns selected item key.
|
| bool |
Is first item in select box ignored?
|
| SelectBox |
setItems
($items, [$useKeys =
TRUE])
Sets items from which to choose.
|
| SelectBox |
skipFirst
([bool $value =
TRUE])
Ignores the first item in select box.
|
| static bool |
validateFilled
(IFormControl $control)
Filled validator: has been any item selected?
|
| Methods Inherited From Component |
|---|
| __construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup() |
| Methods Inherited From Object |
|---|
| extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
| Variable Summary | ||||
|---|---|---|---|---|
| protected array | $allowed | array() |
line 40 |
|
| Method Details | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 55 __constructpublic SelectBox __construct (string $label, [$items =
|
||||||||||||||||||
|
line 124 areKeysUsedpublic bool areKeysUsed () Are the keys used?
|
||||||||||||||||||
|
line 199 getControlpublic Html getControl () Generates control's HTML element. Overridden in child classes as:
|
||||||||||||||||||
|
line 171 getItemspublic array getItems () Returns items from which to choose.
|
||||||||||||||||||
|
line 89 getRawValuepublic mixed getRawValue () Returns selected item key (not checked). Overridden in child classes as:
|
||||||||||||||||||
|
line 182 getSelectedItempublic string getSelectedItem () Returns selected value. Overridden in child classes as:
|
||||||||||||||||||
|
line 73 getValuepublic mixed getValue () Returns selected item key. Overridden in child classes as:
|
||||||||||||||||||
|
line 113 isFirstSkippedpublic bool isFirstSkipped () Is first item in select box ignored?
|
||||||||||||||||||
|
line 136 setItemspublic SelectBox setItems ($items, [$useKeys = Sets items from which to choose.
|
||||||||||||||||||
|
line 101 skipFirstpublic SelectBox skipFirst ([bool $value = Ignores the first item in select box.
|
||||||||||||||||||
|
line 237 validateFilledpublic static bool validateFilled (IFormControl $control) Filled validator: has been any item selected?
|
||||||||||||||||||
