PHP Class Nette\Forms\Controls\MultiChoiceControl

Inheritance: extends BaseControl
Show file Open project: nette/forms Class Usage Examples

Public Properties

Property Type Description
$checkAllowedValues boolean

Public Methods

Method Description
__construct ( $label = NULL, array $items = NULL )
getHtmlName ( ) : string Returns HTML name of control.
getItems ( ) : array Returns items from which to choose.
getRawValue ( ) : array Returns selected keys (not checked).
getSelectedItems ( ) : array Returns selected values.
getValue ( ) : array Returns selected keys.
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 ( $values ) : self Sets selected items (by keys).

Method Details

__construct() public method

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

getHtmlName() public method

Returns HTML name of control.
public getHtmlName ( ) : string
return string

getItems() public method

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

getRawValue() public method

Returns selected keys (not checked).
public getRawValue ( ) : array
return array

getSelectedItems() public method

Returns selected values.
public getSelectedItems ( ) : array
return array

getValue() public method

Returns selected keys.
public getValue ( ) : array
return array

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 items (by keys).
public setValue ( $values ) : self
return self

Property Details

$checkAllowedValues public property

public bool $checkAllowedValues
return boolean