Class RadioList (namespace Nette\Forms)


Set of radio button controls.

Object
   |
   --Component
      |
      --FormControl
         |
         --RadioList
Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Forms/Controls/RadioList.php (line 25)
Public Method Summary
RadioList
__construct ([string $label = NULL], [$items = NULL])
Html
Returns container HTML element template.
Html
getControl ([mixed $key = NULL])
Generates control's HTML element.
array
Returns options from which to choose.
void
getLabel ([string $caption = NULL])
Generates label's HTML element.
Html
Returns separator HTML element template.
mixed
getValue ([bool $raw = FALSE])
Returns selected radio value.
RadioList
setItems ($items)
Sets options from which to choose.
static bool
Filled validator: has been any radio button selected?
Methods Inherited From FormControl
__construct(), addCondition(), addConditionOn(), addError(), addRule(), attached(), cleanErrors(), getControl(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), getValue(), hasErrors(), isDisabled(), isRendered(), isRequired(), loadHttpData(), notifyRule(), setDefaultValue(), setDisabled(), setHtmlId(), setOption(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From Component
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup()
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
protected Html $container

line 31

container element template
protected array $items array()

line 34

protected Html $separator

line 28

separator element template

Method Details

line 42

__construct

public RadioList __construct ([string $label = NULL], [$items = NULL])

Input
string $label label
$items options from which to choose
Output
RadioList  

line 104

getContainerPrototype

public Html getContainerPrototype ()

Returns container HTML element template.

Output
Html  

line 116

getControl

public Html getControl ([mixed $key = NULL])

Generates control's HTML element.

Input
mixed $key
Output
Html  

line 82

getItems

public array getItems ()

Returns options from which to choose.

Output
array  

line 164

getLabel

public void getLabel ([string $caption = NULL])

Generates label's HTML element.

Input
string $caption
Output
void  

line 93

getSeparatorPrototype

public Html getSeparatorPrototype ()

Returns separator HTML element template.

Output
Html  

line 58

getValue

public mixed getValue ([bool $raw = FALSE])

Returns selected radio value.

Input
bool $raw
Output
mixed  

line 70

setItems

public RadioList setItems ($items)

Sets options from which to choose.

Input
$items
Output
RadioList provides a fluent interface

line 178

validateFilled

public static bool validateFilled (IFormControl $control)

Filled validator: has been any radio button selected?

Input
IFormControl $control
Output
bool