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

Public Member Functions

 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)
 

Public Attributes

 $customValidationCode = array()
 

Protected Attributes

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

Private Attributes

 $caption = ''
 
 $datalist
 
 $description = ''
 
 $extra = array()
 
 $maxcols = 6
 
 $pattern_description
 

Detailed Description

Definition at line 28 of file Element.php.

Member Function Documentation

Xoops\Form\Element::getAccessKey ( )

getAccessKey - get the "accesskey" attribute for the element

Returns
string "accesskey" attribute value

Definition at line 252 of file Element.php.

References Xoops\Html\Attributes\getAttribute().

Referenced by Xoops\Form\Element\getAccessString().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::getAccessString (   $str)

getAccessString - If the accesskey is found in the specified string, underlines it

Parameters
string$strstring to add accesskey highlight to
Returns
string Enhanced string with the 1st occurence of accesskey underlined

Definition at line 264 of file Element.php.

References Xoops\Form\Element\getAccessKey().

Here is the call graph for this function:

Xoops\Form\Element::getCaption ( )
Xoops\Form\Element::getClass ( )

getClass - get the "class" attribute for the element

Returns
string "class" attribute value

Definition at line 293 of file Element.php.

References Xoops\Html\Attributes\getAttribute().

Referenced by Xoops\Form\ButtonTray\render(), and Xoops\Form\DhtmlTextArea\render().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::getDatalist ( )

getDatalist - get the datalist attribute for the element

Returns
string "datalist" attribute value

Definition at line 363 of file Element.php.

References Xoops\Form\Element\$datalist, and Xoops\Form\Element\getName().

Here is the call graph for this function:

Xoops\Form\Element::getDescription (   $encode = false)

getDescription - get the element's description

Parameters
boolean$encodeTrue to encode special characters
Returns
string

Definition at line 461 of file Element.php.

References Xoops\Form\Element\$description.

Xoops\Form\Element::getExtra (   $encode = false)

getExtra - Get the extra attributes for the element

Parameters
boolean$encodeTrue to encode special characters
Returns
string

Definition at line 539 of file Element.php.

References Xoops\Form\Element\$value.

Referenced by Xoops\Form\File\render(), Xoops\Form\Hidden\render(), Xoops\Form\DateSelect\render(), Xoops\Form\Button\render(), Xoops\Form\ButtonTray\render(), Xoops\Form\TextArea\render(), Xoops\Form\Text\render(), Xoops\Form\Password\render(), Xoops\Form\Checkbox\render(), Xoops\Form\Radio\render(), Xoops\Form\DhtmlTextArea\render(), and Xoops\Form\Select\render().

Here is the caller graph for this function:

Xoops\Form\Element::getMaxcols ( )

getMaxcols - get the maximum columns for a field

Returns
integer

Definition at line 585 of file Element.php.

References Xoops\Form\Element\$maxcols.

Referenced by Xoops\Form\DateSelect\render(), Xoops\Form\TextArea\render(), Xoops\Form\Text\render(), Xoops\Form\Password\render(), and Xoops\Form\DhtmlTextArea\render().

Here is the caller graph for this function:

Xoops\Form\Element::getPattern ( )

getPattern - get the "pattern" attribute for the element

Returns
string "pattern"

Definition at line 321 of file Element.php.

References Xoops\Html\Attributes\getAttribute().

Here is the call graph for this function:

Xoops\Form\Element::getPatternDescription ( )

getPatternDescription - get the "pattern_description"

Returns
string "pattern_description"

Definition at line 331 of file Element.php.

References Xoops\Form\Element\$pattern_description.

Xoops\Form\Element::getTitle ( )

getTitle - get the title for the element

Returns
string

Definition at line 429 of file Element.php.

References Xoops\Html\Attributes\getAttribute(), and Xoops\Html\Attributes\hasAttribute().

Referenced by Xoops\Form\DhtmlTextArea\render(), and Xoops\Form\Element\renderAttributeString().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::isDatalist ( )

isDatalist - is there a datalist for the element?

Returns
boolean true if element has a non-empty datalist

Definition at line 381 of file Element.php.

Referenced by Xoops\Form\DateSelect\render(), and Xoops\Form\Text\render().

Here is the caller graph for this function:

Xoops\Form\Element::isHidden ( )

isHidden - is this a hidden element?

Returns
boolean true if hidden

Definition at line 481 of file Element.php.

References Xoops\Html\Attributes\hasAttribute().

Here is the call graph for this function:

Xoops\Form\Element::isRequired ( )

isRequired - is entry required for this element?

Returns
boolean true if entry is required

Definition at line 505 of file Element.php.

References Xoops\Html\Attributes\hasAttribute().

Referenced by Xoops\Form\DhtmlTextArea\render(), XoopsFormTinymce4\renderValidationJS(), Xoops\Form\Editor\renderValidationJS(), XoopsFormTinymce\renderValidationJS(), Xoops\Form\Checkbox\renderValidationJS(), Xoops\Form\Select\renderValidationJS(), and Xoops\Form\Element\renderValidationJS().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::render ( )
abstract

render - Generates output for the element.

This method is abstract and must be overwritten by the child classes.

Returns
string
Xoops\Form\Element::renderValidationJS ( )

renderValidationJS - Render custom javascript validation code

Returns
string|false

Definition at line 556 of file Element.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:

Xoops\Form\Element::setAccessKey (   $key)

setAccessKey - set the accesskey attribute for the element

Parameters
string$key"accesskey" attribute for the element
Returns
void

Definition at line 242 of file Element.php.

References Xoops\Html\Attributes\setAttribute().

Here is the call graph for this function:

Xoops\Form\Element::setClass (   $class)

setClass - set the "class" attribute for the element

Parameters
string$class"class" attribute for the element
Returns
void

Definition at line 283 of file Element.php.

References Xoops\Html\Attributes\addAttribute().

Referenced by XoopsFormTinymce\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::setDatalist (   $datalist)

setDatalist - set the datalist attribute for the element

Parameters
string$datalistdatalist attribute for the element
Returns
void

Definition at line 347 of file Element.php.

References Xoops\Form\Element\$datalist.

Xoops\Form\Element::setDescription (   $description)

setDescription - set the element's description

Parameters
string$descriptiondescription
Returns
void

Definition at line 449 of file Element.php.

References Xoops\Form\Element\$description.

Referenced by MenusMenus_menuForm\__construct().

Here is the caller graph for this function:

Xoops\Form\Element::setExtra (   $extra,
  $replace = false 
)

setExtra - Add extra attributes to the element.

This string will be inserted verbatim and unvalidated in the element's tag. Know what you are doing!

Parameters
string$extraextra raw text to insert into form
boolean$replaceIf true, passed string will replace current content, otherwise it will be appended to it
Returns
string[] New content of the extra string

Definition at line 522 of file Element.php.

References Xoops\Form\Element\$extra.

Referenced by Xoops\Form\ButtonTray\__construct(), and Xoops\Form\ColorPicker\render().

Here is the caller graph for this function:

Xoops\Form\Element::setHidden ( )

setHidden - flag the element as "hidden"

Returns
void

Definition at line 471 of file Element.php.

References Xoops\Html\Attributes\setAttribute().

Referenced by Xoops\Form\Hidden\__construct(), and Xoops\Form\Captcha\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::setName (   $name)

setName - set the "name" attribute for the element

Parameters
string$name"name" attribute for the element
Returns
void

Definition at line 220 of file Element.php.

References $name, and Xoops\Html\Attributes\setAttribute().

Referenced by Xoops\Form\Tab\__construct(), Xoops\Form\Label\__construct(), Xoops\Form\TabTray\__construct(), Xoops\Form\Captcha\__construct(), Xoops\Form\ElementTray\__construct(), Xoops\Form\GroupFormCheckbox\__construct(), and Xoops\Form\Checkbox\render().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::setPattern (   $pattern,
  $pattern_description = '' 
)

setPattern - set the "pattern" attribute for the element

Parameters
string$patternpattern attribute for the element
string$pattern_descriptionpattern description
Returns
void

Definition at line 310 of file Element.php.

References Xoops\Form\Element\$pattern_description, and Xoops\Html\Attributes\setAttribute().

Referenced by UserrankRanksForm\__construct(), Xoops\Form\Url\__construct(), and Xoops\Form\Mail\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::setRequired (   $bool = true)

setRequired - set entry required

Parameters
boolean$booltrue to set required entry for this element
Returns
void

Definition at line 493 of file Element.php.

References Xoops\Html\Attributes\setAttribute().

Referenced by Xoops\Form\ElementTray\addElement(), and Xoops\Form\Form\addElement().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Form\Element::setTitle (   $title)

setTitle - set the title for the element

Parameters
string$titletitle for element
Returns
void

Definition at line 419 of file Element.php.

References Xoops\Html\Attributes\setAttribute().

Here is the call graph for this function:

Member Data Documentation

Xoops\Form\Element::$customValidationCode = array()

Definition at line 41 of file Element.php.

Xoops\Form\Element::$datalist
private

Definition at line 93 of file Element.php.

Referenced by Xoops\Form\Element\getDatalist(), and Xoops\Form\Element\setDatalist().

Xoops\Form\Element::$description = ''
private
Xoops\Form\Element::$pattern_description
private

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