PHP Class Nette\Forms\Controls\ChoiceControl

Inheritance: extends BaseControl
Mostrar archivo Open project: nette/forms Class Usage Examples

Public Properties

Property Type Description
$checkAllowedValues boolean

Public Methods

Method Description
__construct ( $label = NULL, array $items = NULL )
getItems ( ) : array Returns items from which to choose.
getRawValue ( ) : string | integer Returns selected key (not checked).
getSelectedItem ( ) : mixed Returns selected value.
getValue ( ) : string | integer Returns selected key.
isFilled ( ) : boolean Is any item selected?
loadHttpData ( ) : void Loads HTTP data.
setDisabled ( $value = TRUE ) : self Disables or enables control or items.
setItems ( array $items, $useKeys = TRUE ) : self Sets items from which to choose.
setValue ( $value ) : self Sets selected item (by key).

Method Details

__construct() public method

public __construct ( $label = NULL, array $items = NULL )
$items array

getItems() public method

Returns items from which to choose.
public getItems ( ) : array
return array

getRawValue() public method

Returns selected key (not checked).
public getRawValue ( ) : string | integer
return string | integer

getSelectedItem() public method

Returns selected value.
public getSelectedItem ( ) : mixed
return mixed

getValue() public method

Returns selected key.
public getValue ( ) : string | integer
return string | integer

isFilled() public method

Is any item selected?
public isFilled ( ) : boolean
return boolean

loadHttpData() public method

Loads HTTP data.
public loadHttpData ( ) : void
return void

setDisabled() public method

Disables or enables control or items.
public setDisabled ( $value = TRUE ) : self
return self

setItems() public method

Sets items from which to choose.
public setItems ( array $items, $useKeys = TRUE ) : self
$items array
return self

setValue() public method

Sets selected item (by key).
public setValue ( $value ) : self
return self

Property Details

$checkAllowedValues public_oe property

public bool $checkAllowedValues
return boolean