cms\includes\class.input.helper.php
\UI_Config_Table
Properties
Methods
\cHTMLInputSelectElement
- Parent(s)
- \cHTMLSelectElement < \cHTMLFormElement < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aEventDefinitions
- Inherited_from
- \cHTMLSelectElement::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLFormElement::$$_aStyleDefinitions
- Inherited_from
- \cHTMLSelectElement::$$_aStyleDefinitions

$_content- Type
- n/a
- Inherited_from
- \cHTML::$$_content
- Inherited_from
- \cHTMLFormElement::$$_content
- Inherited_from
- \cHTMLSelectElement::$$_content

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLFormElement::$$_contentlessTag
- Inherited_from
- \cHTMLSelectElement::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLFormElement::$$_requiredScripts
- Inherited_from
- \cHTMLSelectElement::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLFormElement::$$_skeleton_close
- Inherited_from
- \cHTMLSelectElement::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLFormElement::$$_skeleton_open
- Inherited_from
- \cHTMLSelectElement::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLFormElement::$$_skeleton_single
- Inherited_from
- \cHTMLSelectElement::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLFormElement::$$_styledefs
- Inherited_from
- \cHTMLSelectElement::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLFormElement::$$_tag
- Inherited_from
- \cHTMLSelectElement::$$_tag
Methods

__toString() : stringDirect call of object as string will return it's generated markup.
Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLSelectElement::__toString()| Type | Description |
|---|---|
| string | Generated markup |

_setContent( $content) : void_setContent: Sets the content of the object
Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLSelectElement::_setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

addArticles(int $iIDCat, bool $bColored = false, bool $bArtOnline = true, string $sSpaces = "") : intFunction addArticles.
Adds articles to select box values.
| Name | Type | Description |
|---|---|---|
| $iIDCat | int | idcat of the category to be listed |
| $bColored | bool | Add color information to option elements |
| $bArtOnline | bool | If true, only online articles will be added |
| $sSpaces | string | Just some "" to show data hierarchically (used in conjunction with addCategories) |
| Type | Description |
|---|---|
| int | Number of items added |

addCategories(int $iMaxLevel = 0, bool $bColored = false, bool $bCatVisible = true, bool $bCatPublic = true, bool $bWithArt = false, bool $bArtOnline = true) : intFunction addCategories.
Adds category elements (optionally including articles) to select box values. Note: Using "with articles" adds the articles also - but the categories will get a negative value! There is no way to distinguish between a category id and an article id...
| Name | Type | Description |
|---|---|---|
| $iMaxLevel | int | Max. level shown (to be exact: except this level) |
| $bColored | bool | Add color information to option elements |
| $bCatVisible | bool | If true, only add idcat as value, if cat is visible |
| $bCatPublic | bool | If true, only add idcat as value, if cat is public |
| $bWithArt | bool | Add also articles per category |
| $bArtOnline | bool | If true, show only online articles |
| Type | Description |
|---|---|
| int | Number of items added |

addOptionElement( $index, $element) : \noneAdds an cHTMLOptionElement to the number of choices.
Inherited from: \cHTMLSelectElement::addOptionElement()| Name | Type | Description |
|---|---|---|
| $index | string Index of the element | |
| $element | object Filled cHTMLOptionElement to add |
| Type | Description |
|---|---|
| \none |

addRequiredScript( $script) : void| Name | Type | Description |
|---|---|---|
| $script |

addTypesFromArt(int $iIDCatArt, string $sTypeRange = "") : intFunction addTypesFromArt.
Adds types and type ids which are available for the specified article
| Name | Type | Description |
|---|---|---|
| $iIDCatArt | int | Article id |
| $sTypeRange | string | Komma separated list of Contenido type ids which may be in the resulting list (e.g. '1','17','28') |
| Type | Description |
|---|---|
| int | Number of items added |

advanceID() : voidadvances to the next ID available in the system.
Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLSelectElement::advanceID()This function is useful if you need to use HTML elements in a loop, but don't want to re-create new objects each time.

attachEventDefinition( $sName, $sEvent, $sCode) : voidattachEventDefinition: Attaches the code for an event
Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLSelectElement::attachEventDefinition()Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| Name | Type | Description |
|---|---|---|
| $sName | string defines the name of the event | |
| $sEvent | string defines the event (e.g. onClick) | |
| $sCode | string defines the code |

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLSelectElement::attachStyleDefinition()This function is not restricted to a single style, e.g. you can set multiple style definitions as-is to the handler.
$example->attachStyle("myIdentifier", "border: 1px solid black; white-space: nowrap"); $example->attachStyle("myIdentifier2", "padding: 0px");
Results in:
style="border: 1px solid black; white-space: nowrap; padding: 0px;"
| Name | Type | Description |
|---|---|---|
| $sName | string Name for a style definition | |
| $sDefinition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

autoFill( $stuff) : \noneAutomatically creates and fills cHTMLOptionElements
Inherited from: \cHTMLSelectElement::autoFill()Array format: $stuff = array( array("value","title"), array("value","title"));
or regular key => value arrays.
| Name | Type | Description |
|---|---|---|
| $stuff | array Array with all items |
| Type | Description |
|---|---|
| \none |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLSelectElement::cHTML()
cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \noneConstructor.
Inherited from: \cHTMLFormElement::cHTMLFormElement()\cHTMLSelectElement::cHTMLFormElement()This is a generic form element, where specific elements should be inherited from this class.
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

cHTMLInputSelectElement(string $sName, int $iWidth = "", string $sID = "", string $bDisabled = false, int $iTabIndex = null, $sAccessKey = "") : \noneConstructor.
Creates an HTML select field (aka "DropDown").
| Name | Type | Description |
|---|---|---|
| $sName | string | Name of the element |
| $iWidth | int | Width of the select element |
| $sID | string | ID of the element |
| $bDisabled | string | Item disabled flag (non-empty to set disabled) |
| $iTabIndex | int | Tab index for form elements |
| $sAccessKey |
| Type | Description |
|---|---|
| \none |

cHTMLSelectElement( $name, $width = "", $id = "", $disabled = false, $tabindex = null, $accesskey = "") : \noneCreates an HTML select field (aka "DropDown").
| Name | Type | Description |
|---|---|---|
| $name | string Name of the element | |
| $width | int width of the select element | |
| $id | string ID of the element | |
| $disabled | string Item disabled flag (non-empty to set disabled) | |
| $tabindex | string Tab index for form elements | |
| $accesskey | string Key to access the field |
| Type | Description |
|---|---|
| \none |

fillCloseSkeleton() : stringfillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLSelectElement::fillCloseSkeleton()| Type | Description |
|---|---|
| string | filled SGML closer skeleton |

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLSelectElement::fillSkeleton()fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| Name | Type | Description |
|---|---|---|
| $attributes | string Attributes to set |
| Type | Description |
|---|---|
| string | filled SGML opener skeleton |

getID() : stringgetID: returns the current ID
Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLSelectElement::getID()| Type | Description |
|---|---|
| string | current ID |

render() : stringrender(): Alias for toHtml
Inherited from: \cHTML::render()\cHTMLFormElement::render()\cHTMLSelectElement::render()| Type | Description |
|---|---|
| string | Rendered HTML |

setAccessKey( $accesskey) : \nonesets the access key for this element.
Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLSelectElement::setAccessKey()| Name | Type | Description |
|---|---|---|
| $accesskey | string The length of the access key. May be A-Z and 0-9. |
| Type | Description |
|---|---|
| \none |

setAlt( $alt) : voidsetAlt: sets the alt and title attributes
Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLSelectElement::setAlt()Sets the "alt" and "title" tags. Usually, "alt" is used for accessibility and "title" for mouse overs.
To set the text for all browsers for mouse over, set "alt" and "title". IE behaves incorrectly and shows "alt" on mouse over. Mozilla browsers only show "title" as mouse over.
| Name | Type | Description |
|---|---|---|
| $alt | string Text to set as the "alt" attribute |

setAttribute( $sAttributeName, $sValue) : voidsetAttribte: Sets a specific attribute
Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLSelectElement::setAttribute()| Name | Type | Description |
|---|---|---|
| $sAttributeName | string Name of the attribute | |
| $sValue | string Value of the attribute |

setClass( $class) : voidsets the CSS class
Inherited from: \cHTML::setClass()\cHTMLFormElement::setClass()\cHTMLSelectElement::setClass()| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContentlessTag( $contentlessTag = true) : void| Name | Type | Description |
|---|---|---|
| $contentlessTag |

setDefault( $lvalue) : \noneSets a specific cHTMLOptionElement to the selected state.
Inherited from: \cHTMLSelectElement::setDefault()| Name | Type | Description |
|---|---|---|
| $lvalue | string Specifies the "value" of the cHTMLOptionElement to set |
| Type | Description |
|---|---|
| \none |

setDisabled( $disabled) : \noneSets the "disabled" attribute of an element.
Inherited from: \cHTMLFormElement::setDisabled()\cHTMLSelectElement::setDisabled()User Agents usually are showing the element as "greyed-out".
Example: $obj->setDisabled("disabled"); $obj->setDisabled("");
The first example sets the disabled flag, the second one removes the disabled flag.
| Name | Type | Description |
|---|---|---|
| $disabled | string Sets the disabled-flag if non-empty |
| Type | Description |
|---|---|
| \none |

setEvent( $event, $action) : voidadds an "onXXX" javascript event handler
Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLSelectElement::setEvent()example: $item->setEvent("change","document.forms[0].submit");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event | |
| $action | string Function or action to call (JavaScript Code) |

setGenerateXHTML(bool $value) : voidSetter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLSelectElement::setGenerateXHTML()| Name | Type | Description |
|---|---|---|
| $value | bool |

setID( $id) : voidsets the ID class
Inherited from: \cHTML::setID()\cHTMLFormElement::setID()\cHTMLSelectElement::setID()| Name | Type | Description |
|---|---|---|
| $id |

setSelected(array $aElements) : \noneSelects specified elements as selected
| Name | Type | Description |
|---|---|---|
| $aElements | array | Array with "values" of the cHTMLOptionElement to set |
| Type | Description |
|---|---|
| \none |

setSize( $size) : void| Name | Type | Description |
|---|---|---|
| $size |

setStyle( $style) : voidsets the CSS style
Inherited from: \cHTML::setStyle()\cHTMLFormElement::setStyle()\cHTMLSelectElement::setStyle()| Name | Type | Description |
|---|---|---|
| $style |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLFormElement::setStyleDefinition()\cHTMLSelectElement::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |

setTabindex( $tabindex) : \nonesets the tab index for this element.
Inherited from: \cHTMLFormElement::setTabindex()\cHTMLSelectElement::setTabindex()The tab index needs to be numeric, bigger than 0 and smaller than 32767.
| Name | Type | Description |
|---|---|---|
| $tabindex | int desired tab index |
| Type | Description |
|---|---|
| \none |

toHTML() : voidRenders the output If the tag
Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLSelectElement::toHTML()
unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()\cHTMLSelectElement::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |