XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XoopsFormElement Class Reference
Inheritance diagram for XoopsFormElement:
XoopsFormBreak XoopsFormButton XoopsFormCheckBox XoopsFormColor XoopsFormElementTray XoopsFormFile XoopsFormHidden XoopsFormLabel XoopsFormPassword XoopsFormRadio XoopsFormSelect XoopsFormText XoopsFormTextArea XoopsGroupFormCheckBox

Public Member Functions

 __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 ()
 
 render ()
 
 getMessageForJS ()
 

Data Fields

 $_name
 
 $_caption
 
 $_accesskey = ''
 
 $_class = ''
 
 $_hidden = false
 
 $_extra = ''
 
 $_required = false
 
 $_description = ''
 
 $_id = null
 

Detailed Description

Definition at line 14 of file formelement.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

#- constructor

Definition at line 80 of file formelement.php.

Member Function Documentation

◆ getAccessKey()

getAccessKey ( )

get the "accesskey" attribute for the element

Returns
string "accesskey" attribute value

Definition at line 154 of file formelement.php.

◆ getAccessString()

getAccessString ( $str)

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

Parameters
string$strString where to search the accesskey occurence
Returns
string Enhanced string with the 1st occurence of accesskey underlined

Definition at line 164 of file formelement.php.

◆ getCaption()

getCaption ( )

get the caption for the element

Returns
string

Definition at line 212 of file formelement.php.

◆ getClass()

getClass ( )

get the "class" attribute for the element

Returns
string "class" attribute value

Definition at line 192 of file formelement.php.

◆ getDescription()

getDescription ( )

get the element's description

Returns
string

Definition at line 232 of file formelement.php.

◆ getExtra()

getExtra ( )

Get the extra attributes for the element

Returns
string

Definition at line 286 of file formelement.php.

◆ getId()

getId ( )

get the "id" attribute for the element. If ID is empty, return getName().

Definition at line 135 of file formelement.php.

◆ getMessageForJS()

getMessageForJS ( )

Gets a message for javascript in the specific member function of XoopsForm class.

Definition at line 306 of file formelement.php.

◆ getName()

getName ( $encode = true)

get the "name" attribute for the element

Parameters
boolencode?
Returns
string "name" attribute

Definition at line 115 of file formelement.php.

◆ isBreak()

isBreak ( )

Definition at line 256 of file formelement.php.

◆ isContainer()

isContainer ( )

Is this element a container of other elements?

Returns
bool false

Reimplemented in XoopsFormElementTray.

Definition at line 94 of file formelement.php.

◆ isHidden()

isHidden ( )

Find out if an element is "hidden".

Returns
bool

Definition at line 251 of file formelement.php.

◆ render()

render ( )

Generates output for the element.

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

Reimplemented in XoopsFormButton, XoopsFormCheckBox, XoopsFormColor, XoopsFormDhtmlTextArea, XoopsFormElementTray, XoopsFormFile, XoopsFormHidden, XoopsFormLabel, XoopsFormPassword, XoopsFormRadio, XoopsFormSelect, XoopsFormText, XoopsFormTextArea, XoopsFormTextDateSelect, and XoopsGroupFormCheckBox.

Definition at line 299 of file formelement.php.

◆ setAccessKey()

setAccessKey ( $key)

set the "accesskey" attribute for the element

Parameters
string$key"accesskey" attribute for the element

Definition at line 145 of file formelement.php.

◆ setCaption()

setCaption ( $caption)

set the caption for the element

Parameters
string$caption

Definition at line 202 of file formelement.php.

◆ setClass()

setClass ( $class)

set the "class" attribute for the element

Parameters
$class

Definition at line 178 of file formelement.php.

◆ setDescription()

setDescription ( $description)

set the element's description

Parameters
string$description

Definition at line 222 of file formelement.php.

◆ setExtra()

setExtra ( $extra,
$replace = false )

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$extra
bool$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 271 of file formelement.php.

◆ setHidden()

setHidden ( )

flag the element as "hidden"

Definition at line 241 of file formelement.php.

◆ setId()

setId ( $id)

Set $id to member property.

Parameters
string$id

Definition at line 127 of file formelement.php.

◆ setName()

setName ( $name)

set the "name" attribute for the element

Parameters
string$name"name" attribute for the element

Definition at line 104 of file formelement.php.

◆ XoopsFormElement()

Definition at line 84 of file formelement.php.

Field Documentation

◆ $_accesskey

$_accesskey = ''

Definition at line 36 of file formelement.php.

◆ $_caption

$_caption

Definition at line 30 of file formelement.php.

◆ $_class

$_class = ''

Definition at line 42 of file formelement.php.

◆ $_description

$_description = ''

Definition at line 66 of file formelement.php.

◆ $_extra

$_extra = ''

Definition at line 54 of file formelement.php.

◆ $_hidden

$_hidden = false

Definition at line 48 of file formelement.php.

◆ $_id

$_id = null

Definition at line 72 of file formelement.php.

◆ $_name

$_name

Definition at line 24 of file formelement.php.

◆ $_required

$_required = false

Definition at line 60 of file formelement.php.


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