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

Public Member Functions

 __construct ($caption, $name, $value=null, $inline=true)
 
 addOption ($value, $name= '')
 
 addOptionArray ($options)
 
 getInline ()
 
 getOptions ($encode=0)
 
 render ()
 
 renderValidationJS ()
 
- 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 = array()
 
- 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 27 of file Checkbox.php.

Constructor & Destructor Documentation

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

Constructor

Parameters
string$captioncaptiom
string$nameelement name
mixed$valueEither one value as a string or an array of them.
boolean$inlinetrue for inline arrangement

Definition at line 58 of file Checkbox.php.

References Xoops\Form\Element\$caption, Xoops\Form\Checkbox\$inline, $name, Xoops\Form\Checkbox\$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\Checkbox::addOption (   $value,
  $name = '' 
)

Add an option

Parameters
string$valuevalue
string$namename
Returns
void

Definition at line 77 of file Checkbox.php.

References $name, and Xoops\Form\Checkbox\$value.

Referenced by CommentsCommentForm\__construct(), Xoops\Form\GroupCheckbox\__construct(), and Xoops\Form\Checkbox\addOptionArray().

Here is the caller graph for this function:

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

Add multiple Options at once

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

Definition at line 93 of file Checkbox.php.

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

Here is the call graph for this function:

Xoops\Form\Checkbox::getInline ( )

Get the position of this group

Returns
string

Definition at line 130 of file Checkbox.php.

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

Here is the caller graph for this function:

Xoops\Form\Checkbox::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 112 of file Checkbox.php.

References $name, Xoops\Form\Checkbox\$options, and Xoops\Form\Checkbox\$value.

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

Here is the caller graph for this function:

Xoops\Form\Checkbox::renderValidationJS ( )

Render custom javascript validation code

Returns
string

Definition at line 192 of file Checkbox.php.

References XoopsLocaleEn_US\F_ENTER, Xoops\Form\Element\getCaption(), Xoops\Form\Element\getName(), and Xoops\Form\Element\isRequired().

Here is the call graph for this function:

Member Data Documentation

Xoops\Form\Checkbox::$inline
private

Definition at line 48 of file Checkbox.php.

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

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

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