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

Public Member Functions

 __construct ($caption, $name, $value=null)
 
 XoopsFormCheckBox ($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 = []
 
- Data Fields inherited from XoopsFormElement
 $_name
 
 $_caption
 
 $_accesskey = ''
 
 $_class = ''
 
 $_hidden = false
 
 $_extra = ''
 
 $_required = false
 
 $_description = ''
 
 $_id = null
 

Detailed Description

Definition at line 17 of file formcheckbox.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

Parameters
string$caption
string$name
mixed$valueEither one value as a string or an array of them.

Definition at line 41 of file formcheckbox.php.

Member Function Documentation

◆ addOption()

addOption ( $value,
$name = '' )

Add an option

Parameters
string$value
string$name

Definition at line 87 of file formcheckbox.php.

◆ addOptionArray()

addOptionArray ( $options)

Add multiple Options at once

Parameters
array$optionsAssociative array of value->name pairs

Definition at line 101 of file formcheckbox.php.

◆ getOptions()

getOptions ( )

Get an array with all the options

Returns
array Associative array of value->name pairs

Definition at line 115 of file formcheckbox.php.

◆ getValue()

getValue ( )

Get the "value"

Returns
array

Definition at line 59 of file formcheckbox.php.

◆ render()

render ( )

prepare HTML for output

Returns
string

Reimplemented from XoopsFormElement.

Definition at line 125 of file formcheckbox.php.

◆ setValue()

setValue ( $value)

Set the "value"

Parameters
array

Definition at line 69 of file formcheckbox.php.

◆ XoopsFormCheckBox()

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

Definition at line 49 of file formcheckbox.php.

Field Documentation

◆ $_options

$_options = []

Definition at line 25 of file formcheckbox.php.

◆ $_value

$_value = []

Definition at line 32 of file formcheckbox.php.


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