XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsFormRadio Class Reference
Inheritance diagram for XoopsFormRadio:
XoopsFormElement XoopsFormRadioYN

Public Member Functions

 __construct ($caption, $name, $value=null)
 
 XoopsFormRadio ($caption, $name, $value=null)
 
 getValue ()
 
 setValue ($value)
 
 addOption ($value, $name='')
 
 addOptionArray ($options)
 
 getOptions ()
 
 render ()
 
- Public Member Functions inherited from XoopsFormElement
 __construct ()
 
 XoopsFormElement ()
 
 isContainer ()
 
 setName ($name)
 
 getName ($encode=true)
 
 setId ($id)
 
 getId ()
 
 setAccessKey ($key)
 
 getAccessKey ()
 
 getAccessString ($str)
 
 setClass ($class)
 
 getClass ()
 
 setCaption ($caption)
 
 getCaption ()
 
 setDescription ($description)
 
 getDescription ()
 
 setHidden ()
 
 isHidden ()
 
 isBreak ()
 
 setExtra ($extra, $replace=false)
 
 getExtra ()
 
 getMessageForJS ()
 

Data Fields

 $_options = []
 
 $_value = null
 
- Data Fields inherited from XoopsFormElement
 $_name
 
 $_caption
 
 $_accesskey = ''
 
 $_class = ''
 
 $_hidden = false
 
 $_extra = ''
 
 $_required = false
 
 $_description = ''
 
 $_id = null
 

Detailed Description

Definition at line 18 of file formradio.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $caption,
$name,
$value = null )

Constructor

Parameters
string$captionCaption
string$name"name" attribute
string$valuePre-selected value

Definition at line 42 of file formradio.php.

Member Function Documentation

◆ addOption()

addOption ( $value,
$name = '' )

Add an option

Parameters
string$value"value" attribute - This gets submitted as form-data.
string$name"name" attribute - This is displayed. If empty, we use the "value" instead.

Definition at line 81 of file formradio.php.

◆ addOptionArray()

addOptionArray ( $options)

Adds multiple options

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

Definition at line 95 of file formradio.php.

◆ getOptions()

getOptions ( )

Gets the options

Returns
array Associative array of value->name pairs.

Definition at line 109 of file formradio.php.

◆ getValue()

getValue ( )

Get the pre-selected value

Returns
string

Definition at line 60 of file formradio.php.

◆ render()

render ( )

Prepare HTML for output

Returns
string HTML

Reimplemented from XoopsFormElement.

Definition at line 119 of file formradio.php.

◆ setValue()

setValue ( $value)

Set the pre-selected value

Parameters
string$value

Definition at line 70 of file formradio.php.

◆ XoopsFormRadio()

XoopsFormRadio ( $caption,
$name,
$value = null )

Definition at line 50 of file formradio.php.

Field Documentation

◆ $_options

$_options = []

Definition at line 26 of file formradio.php.

◆ $_value

$_value = null

Definition at line 33 of file formradio.php.


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