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() : string
Direct 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 = "") : int
Function 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) : int
Function 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) : \none
Adds 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 = "") : int
Function 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() : void
advances 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) : void
attachEventDefinition: 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) : string
attachStyleDefinition: 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) : \none
Automatically 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() : void
Constructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLSelectElement::cHTML()

cHTMLFormElement( $name = "", $id = "", $disabled = "", $tabindex = "", $accesskey = "") : \none
Constructor.
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 = "") : \none
Constructor.
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 = "") : \none
Creates 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() : string
fillCloseSkeleton: Fills the close skeleton
Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLSelectElement::fillCloseSkeleton()Type | Description |
---|---|
string | filled SGML closer skeleton |


fillSkeleton( $attributes) : string
fillSkeleton: 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() : string
getID: returns the current ID
Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLSelectElement::getID()Type | Description |
---|---|
string | current ID |


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


setAccessKey( $accesskey) : \none
sets 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) : void
setAlt: 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) : void
setAttribte: 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) : void
sets 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) : \none
Sets 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) : \none
Sets 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) : void
adds 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) : void
Setter for static $_generateXHTML property
Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLSelectElement::setGenerateXHTML()Name | Type | Description |
---|---|---|
$value | bool |


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


setSelected(array $aElements) : \none
Selects 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) : void
sets the CSS style
Inherited from: \cHTML::setStyle()\cHTMLFormElement::setStyle()\cHTMLSelectElement::setStyle()Name | Type | Description |
---|---|---|
$style |


setStyleDefinition( $entity, $definition) : string
addStyleDefinition
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) : \none
sets 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() : void
Renders the output If the tag
Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLSelectElement::toHTML()

unsetEvent( $event) : void
removes an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLFormElement::unsetEvent()\cHTMLSelectElement::unsetEvent()example: $item->unsetEvent("change");
Name | Type | Description |
---|---|---|
$event | string Type of the event |