XOOPS  2.6.0
Xoops\Form\Radio Class Reference
Inheritance diagram for Xoops\Form\Radio:
Inheritance graph

Public Member Functions

 __construct ($caption, $name, $value=null, $inline=true)
 
 addOption ($value, $buttonCaption= '')
 
 addOptionArray ($options)
 
 getInline ()
 
 getOptions ($encode=0)
 
 getValue ($encode=false)
 
 render ()
 
- Public Member Functions inherited from Xoops\Form\Element
 getAccessKey ()
 
 getAccessString ($str)
 
 getCaption ()
 
 getClass ()
 
 getDatalist ()
 
 getDescription ($encode=false)
 
 getExtra ($encode=false)
 
 getMaxcols ()
 
 getName ()
 
 getPattern ()
 
 getPatternDescription ()
 
 getTitle ()
 
 getValue ($encode=false)
 
 isDatalist ()
 
 isHidden ()
 
 isRequired ()
 
 render ()
 
 renderAttributeString ()
 
 renderValidationJS ()
 
 setAccessKey ($key)
 
 setCaption ($caption)
 
 setClass ($class)
 
 setDatalist ($datalist)
 
 setDescription ($description)
 
 setExtra ($extra, $replace=false)
 
 setHidden ()
 
 setName ($name)
 
 setPattern ($pattern, $pattern_description= '')
 
 setRequired ($bool=true)
 
 setTitle ($title)
 
 setValue ($value)
 
- Public Member Functions inherited from Xoops\Html\Attributes
 addAttribute ($name, $value)
 
 getAttribute ($name)
 
 hasAttribute ($name)
 
 renderAttributeString ()
 
 setAttribute ($name, $value=null)
 
 setAttributes ($values)
 
 unsetAttribute ($name)
 

Protected Attributes

 $value = null
 
- Protected Attributes inherited from Xoops\Form\Element
 $value = ''
 
- Protected Attributes inherited from Xoops\Html\Attributes
 $attributes = array()
 

Private Attributes

 $inline
 
 $options = array()
 

Additional Inherited Members

- Public Attributes inherited from Xoops\Form\Element
 $customValidationCode = array()
 

Detailed Description

Definition at line 26 of file Radio.php.

Constructor & Destructor Documentation

Xoops\Form\Radio::__construct (   $caption,
  $name,
  $value = null,
  $inline = true 
)

__construct

Parameters
string$captionCaption
string$namename attribute
string$valuePre-selected value
boolean$inlinetrue to display inline

Definition at line 57 of file Radio.php.

References Xoops\Form\Element\$caption, Xoops\Form\Radio\$inline, $name, Xoops\Form\Radio\$value, Xoops\Html\Attributes\setAttribute(), Xoops\Form\Element\setCaption(), and Xoops\Form\Element\setValue().

Here is the call graph for this function:

Member Function Documentation

Xoops\Form\Radio::addOption (   $value,
  $buttonCaption = '' 
)

Add an option

Parameters
string$valuevalue attribute for option - This gets submitted as form-data.
string$buttonCaptionoption button caption - If empty, we use the "value" instead.
Returns
void

Definition at line 88 of file Radio.php.

References Xoops\Form\Radio\$value.

Referenced by Xoops\Form\RadioYesNo\__construct(), and Xoops\Form\Radio\addOptionArray().

Here is the caller graph for this function:

Xoops\Form\Radio::addOptionArray (   $options)

Adds multiple options

Parameters
array$optionsAssociative array of value->name pairs.
Returns
void

Definition at line 104 of file Radio.php.

References Xoops\Form\Radio\$options, and Xoops\Form\Radio\addOption().

Here is the call graph for this function:

Xoops\Form\Radio::getInline ( )

sets the class for inline orientation

Returns
string

Definition at line 141 of file Radio.php.

Referenced by Xoops\Form\Radio\render().

Here is the caller graph for this function:

Xoops\Form\Radio::getOptions (   $encode = 0)

Get an array with all the options

Parameters
integer$encodeencode special characters, potential values: 0 - skip 1 - only for value; 2 - for both value and name
Returns
array Associative array of value->name pairs

Definition at line 123 of file Radio.php.

References Xoops\$option, Xoops\Form\Radio\$options, and Xoops\Form\Radio\$value.

Referenced by Xoops\Form\Radio\render().

Here is the caller graph for this function:

Xoops\Form\Radio::getValue (   $encode = false)

Get the "value" attribute

Parameters
boolean$encodeTrue to encode special characters
Returns
string

Definition at line 75 of file Radio.php.

References Xoops\Form\Radio\$value.

Referenced by Xoops\Form\Radio\render().

Here is the caller graph for this function:

Member Data Documentation

Xoops\Form\Radio::$inline
private

Definition at line 47 of file Radio.php.

Referenced by Xoops\Form\Radio\__construct().

Xoops\Form\Radio::$options = array()
private

Definition at line 33 of file Radio.php.

Referenced by Xoops\Form\Radio\addOptionArray(), and Xoops\Form\Radio\getOptions().


The documentation for this class was generated from the following file: