Class RadioList (namespace Nette\Forms)


Set of radio button controls.

Object
   |
   --Component
      |
      --FormControl
         |
         --RadioList
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Forms/Controls/RadioList.php (line 34)
Public Method Summary
RadioList
__construct (string $label, [$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
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(), cleanErrors(), getControl(), getControlPrototype(), getErrors(), getForm(), getHtmlId(), getHtmlName(), getLabel(), getLabelPrototype(), getOption(), getOptions(), getRules(), getTranslator(), getValue(), hasErrors(), isDisabled(), isRendered(), isRequired(), loadHttpData(), notifyRule(), setDisabled(), setHtmlId(), setOption(), setParent(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From Component
__construct(), attached(), detached(), getName(), getParent(), getService(), getServiceLocator(), lookup(), lookupPath(), monitor(), setParent(), setServiceLocator(), validateParent(), __clone(), __wakeup()
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
protected Html $container

line 40

container element template
protected array $items array()

line 43

protected Html $separator

line 37

separator element template

Method Details

line 51

__construct

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

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

line 113

getContainerPrototype

public Html getContainerPrototype ()

Returns container HTML element template.

Output
Html  

line 125

getControl

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

Generates control's HTML element.

Input
mixed $key
Output
Html  

line 91

getItems

public array getItems ()

Returns options from which to choose.

Output
array  

line 172

getLabel

public void getLabel ()

Generates label's HTML element.

Output
void  

line 102

getSeparatorPrototype

public Html getSeparatorPrototype ()

Returns separator HTML element template.

Output
Html  

line 67

getValue

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

Returns selected radio value.

Input
bool $raw
Output
mixed  

line 79

setItems

public RadioList setItems ($items)

Sets options from which to choose.

Input
$items
Output
RadioList provides a fluent interface

line 186

validateFilled

public static bool validateFilled (IFormControl $control)

Filled validator: has been any radio button selected?

Input
IFormControl $control
Output
bool