API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsFormElementTray Class Reference
Inheritance diagram for XoopsFormElementTray:
Collaboration diagram for XoopsFormElementTray:

Public Member Functions

 __construct ($caption, $delimeter=' ', $name='')
 
 isContainer ()
 
 isRequired ()
 
 addElement (XoopsFormElement $formElement, $required=false)
 
getRequired ()
 
getElements ($recurse=false)
 
 getDelimeter ($encode=false)
 
 setOrientation ($direction)
 
 getOrientation ()
 
 render ()
 
- Public Member Functions inherited from XoopsFormElement
 __construct ()
 
 isContainer ()
 
 setName ($name)
 
 getName ($encode=true)
 
 setAccessKey ($key)
 
 getAccessKey ()
 
 getAccessString ($str)
 
 setClass ($class)
 
 getClass ()
 
 setCaption ($caption)
 
 getCaption ($encode=false)
 
 getTitle ($encode=true)
 
 setDescription ($description)
 
 getDescription ($encode=false)
 
 setHidden ()
 
 isHidden ()
 
 isRequired ()
 
 setExtra ($extra, $replace=false)
 
 getExtra ($encode=false)
 
 setNocolspan ($nocolspan=true)
 
 getNocolspan ()
 
 getFormType ()
 
 setFormType ($value='')
 
 renderValidationJS ()
 
 render ()
 

Data Fields

const ORIENTATION_HORIZONTAL = 'horizontal'
 
const ORIENTATION_VERTICAL = 'vertical'
 
 $_required = array()
 
- Data Fields inherited from XoopsFormElement
 $customValidationCode = array()
 
 $_name
 
 $_caption
 
 $_accesskey = ''
 
 $_class = array()
 
 $_hidden = false
 
 $_extra = array()
 
 $_required = false
 
 $_description = ''
 
 $_nocolspan = false
 
 $_formtype = ''
 

Protected Attributes

 $orientation
 

Detailed Description

A group of form elements

Constructor & Destructor Documentation

◆ __construct()

__construct (   $caption,
  $delimeter = ' ',
  $name = '' 
)

constructor

Parameters
string$captionCaption for the group.
string$delimeterHTML to separate the elements
string$name
Here is the call graph for this function:

Member Function Documentation

◆ addElement()

addElement ( XoopsFormElement  $formElement,
  $required = false 
)

Add an element to the group

Parameters
XoopsFormElement$formElementXoopsFormElement to add
bool$required
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDelimeter()

getDelimeter (   $encode = false)

Get the delimiter of this group

Parameters
bool$encodeTo sanitizer the text?
Returns
string The delimiter
Here is the caller graph for this function:

◆ getElements()

& getElements (   $recurse = false)

Get an array of the elements in this group

Parameters
bool$recurseget elements recursively?
Returns
XoopsFormElement[] Array of XoopsFormElement objects.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrientation()

getOrientation ( )

getOrientation() return the expected tray orientation

The value will be assigned a default value if not previously set.

The default logic considers the presence of an html br tag in _delimeter as implying ORIENTATION_VERTICAL for bc

Returns
string either \XoopsFormElementTray::ORIENTATION_HORIZONTAL or \XoopsFormElementTray::ORIENTATION_VERTICAL\
Here is the caller graph for this function:

◆ getRequired()

& getRequired ( )

get an array of "required" form elements

Returns
array array of XoopsFormElements

◆ isContainer()

isContainer ( )

Is this element a container of other elements?

Returns
bool true

Reimplemented from XoopsFormElement.

Here is the caller graph for this function:

◆ isRequired()

isRequired ( )

Find out if there are required elements.

Returns
bool

Reimplemented from XoopsFormElement.

◆ render()

render ( )

prepare HTML to output this group

Returns
string HTML output

Reimplemented from XoopsFormElement.

Reimplemented in XoopsFormSelectEditor.

Here is the call graph for this function:

◆ setOrientation()

setOrientation (   $direction)

setOrientation() communicate to renderer the expected tray orientation \XoopsFormElementTray::ORIENTATION_HORIZONTAL for across \XoopsFormElementTray::ORIENTATION_VERTICAL for up and down

If not set explicitly, a default value will be assigned on getOrientation()

Parameters
string$directionORIENTATION constant

Field Documentation

◆ $_required

$_required = array()

◆ $orientation

$orientation
protected

◆ ORIENTATION_HORIZONTAL

const ORIENTATION_HORIZONTAL = 'horizontal'

◆ ORIENTATION_VERTICAL

const ORIENTATION_VERTICAL = 'vertical'

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