PHP Class Nette\Forms\Controls\SelectBox

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

Public Methods

Method Description
__construct ( $label = NULL, array $items = NULL )
addOptionAttributes ( array $attributes ) : self
getControl ( ) : Nette\Utils\Html Generates control's HTML element.
getPrompt ( ) : mixed Returns first prompt item?
isOk ( ) : boolean
setItems ( array $items, $useKeys = TRUE ) : self Sets options and option groups from which to choose.
setPrompt ( $prompt ) : self Sets first prompt item in select box.

Method Details

__construct() public method

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

addOptionAttributes() public method

public addOptionAttributes ( array $attributes ) : self
$attributes array
return self

getControl() public method

Generates control's HTML element.
public getControl ( ) : Nette\Utils\Html
return Nette\Utils\Html

getPrompt() public method

Returns first prompt item?
public getPrompt ( ) : mixed
return mixed

isOk() public method

public isOk ( ) : boolean
return boolean

setItems() public method

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

setPrompt() public method

Sets first prompt item in select box.
public setPrompt ( $prompt ) : self
return self