Class NRadioList


NSet of radio button controls.

NObject
   |
   --NComponent
      |
      --NFormControl
         |
         --NRadioList
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Forms/Controls/RadioList.php (line 37)
Public Method Summary
NRadioList
__construct ([string $label = NULL], [$items = NULL])
NHtml
Returns container HTML element template.
NHtml
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.
NHtml
Returns separator HTML element template.
mixed
getValue ([bool $raw = FALSE])
Returns selected radio value.
NRadioList
setItems ($items)
Sets options from which to choose.
static bool
Filled validator: has been any radio button selected?
Methods Inherited From NFormControl
__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(), setParent(), setRendered(), setRequired(), setTranslator(), setValue(), translate(), validateEqual(), validateFilled(), validateValid()
Methods Inherited From NComponent
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup()
Methods Inherited From NObject
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
protected NHtml $container

line 43

container element template
protected array $items array()

line 46

protected NHtml $separator

line 40

separator element template

Method Details

line 54

__construct

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

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

line 116

getContainerPrototype

public NHtml getContainerPrototype ()

Returns container HTML element template.

Output
NHtml  

line 128

getControl

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

Generates control's HTML element.

Input
mixed $key
Output
NHtml  

line 94

getItems

public array getItems ()

Returns options from which to choose.

Output
array  

line 176

getLabel

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

Generates label's HTML element.

Input
string $caption
Output
void  

line 105

getSeparatorPrototype

public NHtml getSeparatorPrototype ()

Returns separator HTML element template.

Output
NHtml  

line 70

getValue

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

Returns selected radio value.

Input
bool $raw
Output
mixed  

line 82

setItems

public NRadioList setItems ($items)

Sets options from which to choose.

Input
$items
Output
NRadioList provides a fluent interface

line 190

validateFilled

public static bool validateFilled (IFormControl $control)

Filled validator: has been any radio button selected?

Input
IFormControl $control
Output
bool