Class ChoiceControl
Choice control that allows single item selection.
-
Nette\Object
-
Nette\ComponentModel\Component
implements
Nette\ComponentModel\IComponent
-
Nette\Forms\Controls\BaseControl
implements
Nette\Forms\IControl
-
Nette\Forms\Controls\ChoiceControl
Methods summary
public
|
#
__construct( string $label = NULL, array $items = NULL )
Parameters
- $label
string caption
- $items
Overrides
|
public
|
|
public
Nette\Forms\Controls\ChoiceControl
|
#
setValue( scalar $value )
Sets selected item (by key).
Sets selected item (by key).
Parameters
Returns
Overrides
|
public
scalar
|
#
getValue( )
Returns selected key.
Returns
scalar
Overrides
|
public
scalar
|
#
getRawValue( )
Returns selected key (not checked).
Returns selected key (not checked).
Returns
scalar
|
public
boolean
|
#
isFilled( )
Is any item selected?
Returns
boolean
Overrides
|
public
Nette\Forms\Controls\ChoiceControl
|
#
setItems( array $items, boolean $useKeys = TRUE )
Sets items from which to choose.
Sets items from which to choose.
Parameters
- $items
array
- $useKeys
boolean
Returns
|
public
array
|
#
getItems( )
Returns items from which to choose.
Returns items from which to choose.
Returns
array
|
public
mixed
|
|
public
Nette\Forms\Controls\ChoiceControl
|
#
setDisabled( boolean|array $value = TRUE )
Disables or enables control or items.
Disables or enables control or items.
Parameters
Returns
Overrides
|
Methods inherited from Nette\Forms\Controls\BaseControl
addCondition(),
addConditionOn(),
addError(),
addRule(),
attached(),
cleanErrors(),
exportRules(),
getControl(),
getControlPrototype(),
getError(),
getErrors(),
getForm(),
getHtmlId(),
getHtmlName(),
getHttpData(),
getLabel(),
getLabelPrototype(),
getOption(),
getOptions(),
getRules(),
getTranslator(),
hasErrors(),
isDisabled(),
isOmitted(),
isRequired(),
setAttribute(),
setDefaultValue(),
setHtmlId(),
setOmitted(),
setOption(),
setRequired(),
setTranslator(),
translate(),
validate()
|
Methods inherited from Nette\ComponentModel\Component
__clone(),
__sleep(),
__wakeup(),
detached(),
getName(),
getParent(),
lookup(),
lookupPath(),
monitor(),
unmonitor(),
validateParent()
|
Magic properties inherited from Nette\Forms\Controls\BaseControl
$control,
$controlPrototype,
$defaultValue,
$disabled,
$errors,
$filled,
$form,
$htmlId,
$htmlName,
$label,
$labelPrototype,
$omitted,
$options,
$required,
$rules,
$translator,
$value
|