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 37)
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
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 43

container element template
protected array $items array()

line 46

protected Html $separator

line 40

separator element template

Method Details

line 54

__construct

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

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

line 116

getContainerPrototype

public Html getContainerPrototype ()

Returns container HTML element template.

Output
Html  

line 128

getControl

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

Generates control's HTML element.

Input
mixed $key
Output
Html  

line 94

getItems

public array getItems ()

Returns options from which to choose.

Output
array  

line 175

getLabel

public void getLabel ()

Generates label's HTML element.

Output
void  

line 105

getSeparatorPrototype

public Html getSeparatorPrototype ()

Returns separator HTML element template.

Output
Html  

line 70

getValue

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

Returns selected radio value.

Input
bool $raw
Output
mixed  

line 82

setItems

public RadioList setItems ($items)

Sets options from which to choose.

Input
$items
Output
RadioList provides a fluent interface

line 189

validateFilled

public static bool validateFilled (IFormControl $control)

Filled validator: has been any radio button selected?

Input
IFormControl $control
Output
bool