contenido\classes\widgets\class.widgets.datawidgets.php

Show: PublicProtectedPrivateinherited
Table of Contents

\cDataCheckboxWidget

Package: Default
class cDataCheckboxWidget cDataCheckboxWidget generates a checkbox for use with the dataobjects
Parent(s)
\cHTMLCheckbox < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
inherited
Defines which JS events contain which scripts
Inherited from: \cHTML::$$_aEventDefinitions\cHTMLFormElement::$$_aEventDefinitions\cHTMLCheckbox::$$_aEventDefinitions
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLCheckbox::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLCheckbox::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLCheckbox::$$_contentlessTag  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLCheckbox::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLCheckbox::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLCheckbox::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
inherited
Storage of the open SGML tag template
Inherited from: \cHTML::$$_skeleton_open\cHTMLFormElement::$$_skeleton_open\cHTMLCheckbox::$$_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLCheckbox::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLCheckbox::$$_skeleton_single  
>VPropertypublicstring $_styledefs
inherited
Defines the style definitions
Inherited from: \cHTML::$$_styledefs\cHTMLFormElement::$$_styledefs\cHTMLCheckbox::$$_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLCheckbox::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLCheckbox::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLCheckbox::$$_tag  
>VPropertypublic$_value
inheritedInherited from: \cHTMLCheckbox::$$_value
Details
Type
n/a
Inherited_from
\cHTMLCheckbox::$$_value  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLCheckbox::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLCheckbox::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLCheckbox::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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

attachEventDefinition: Attaches the code for an event

Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLCheckbox::attachEventDefinition()

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string
inherited

attachStyleDefinition: Attaches a style definition.

Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLCheckbox::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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccDataCheckboxWidget( $name,  $parameters) : void

cDataCheckboxWidget: Creates a checkbox widget

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: title string Title of the checkbox label default string Checked or not checked

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLCheckbox::cHTML()
methodpubliccHTMLCheckbox( $name,  $value,  $id = "",  $checked = false,  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLCheckbox::cHTMLCheckbox()

Creates an HTML checkbox element.

Parameters
NameTypeDescription
$name

string Name of the element

$value

string Value of the radio button

$id

string ID of the element

$checked

boolean Is element checked?

$disabled

string Item disabled flag (non-empty to set disabled)

$tabindex

string Tab index for form elements

$accesskey

string Key to access the field

Returns
TypeDescription
\none
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLCheckbox::fillCloseSkeleton()
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

fillSkeleton: Fills the open SGML tag skeleton

Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLCheckbox::fillSkeleton()

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLCheckbox::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

render(): Alias for toHtml

Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLCheckbox::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLCheckbox::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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLCheckbox::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetChecked( $checked) : \none
inherited

Sets the checked flag.

Inherited from: \cHTMLCheckbox::setChecked()
Parameters
NameTypeDescription
$checked

boolean If true, the "checked" attribute will be assigned.

Returns
TypeDescription
\none
methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDisabled( $disabled) : \none
inherited

Sets the "disabled" attribute of an element.

Inherited from: \cHTMLFormElement::setDisabled()\cHTMLCheckbox::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.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLCheckbox::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLCheckbox::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
Parameters
NameTypeDescription
$id
methodpublicsetLabelText( $text) : \none
inherited

Sets a custom label text

Inherited from: \cHTMLCheckbox::setLabelText()
Parameters
NameTypeDescription
$text

string Text to display

Returns
TypeDescription
\none
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

sets the tab index for this element.

Inherited from: \cHTMLFormElement::setTabindex()\cHTMLCheckbox::setTabindex()

The tab index needs to be numeric, bigger than 0 and smaller than 32767.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLCheckbox::toHTML()
methodpublictoHtml( $renderlabel = true) : string
inherited

Renders the checkbox element.

Inherited from: \cHTMLCheckbox::toHtml()

Note:

If this element has an ID, the value (which equals the text displayed) will be rendered as seperate HTML label, if not, it will be displayed as regular text. Displaying the value can be turned off via the parameter.

Parameters
NameTypeDescription
$renderlabel

boolean If true, renders a label

Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cDataCodeTextareaWidget

Package: Default
class cDataCodeTextareaWidget cDataCodeTextareaWidget generates a textarea widget for use with the data objects.
Parent(s)
\cHTMLTextarea < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
inherited
Defines which JS events contain which scripts
Inherited from: \cHTML::$$_aEventDefinitions\cHTMLFormElement::$$_aEventDefinitions\cHTMLTextarea::$$_aEventDefinitions
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLTextarea::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLTextarea::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLTextarea::$$_contentlessTag  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLTextarea::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLTextarea::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLTextarea::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
inherited
Storage of the open SGML tag template
Inherited from: \cHTML::$$_skeleton_open\cHTMLFormElement::$$_skeleton_open\cHTMLTextarea::$$_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLTextarea::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLTextarea::$$_skeleton_single  
>VPropertypublicstring $_styledefs
inherited
Defines the style definitions
Inherited from: \cHTML::$$_styledefs\cHTMLFormElement::$$_styledefs\cHTMLTextarea::$$_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLTextarea::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLTextarea::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLTextarea::$$_tag  
>VPropertypublic$_value
inheritedInherited from: \cHTMLTextarea::$$_value
Details
Type
n/a
Inherited_from
\cHTMLTextarea::$$_value  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLTextarea::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLTextarea::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLTextarea::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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

attachEventDefinition: Attaches the code for an event

Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLTextarea::attachEventDefinition()

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string
inherited

attachStyleDefinition: Attaches a style definition.

Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLTextarea::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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccDataCodeTextareaWidget( $name,  $parameters) : void

cDataTextareaWidget: Creates a text area widget which can be used for entering code

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: default Default value for this area notes Notes for this area

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextarea::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpubliccHTMLTextarea( $name,  $initvalue = "",  $width = "",  $height = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLTextarea::cHTMLTextarea()

Creates an HTML text area.

If no additional parameters are specified, the default width is 60 chars, and the height is 5 chars.

Parameters
NameTypeDescription
$name

string Name of the element

$initvalue

string Initial value of the textarea

$width

int width of the textarea

$height

int height of the textarea

$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

Returns
TypeDescription
\none
methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLTextarea::fillCloseSkeleton()
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

fillSkeleton: Fills the open SGML tag skeleton

Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLTextarea::fillSkeleton()

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLTextarea::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

render(): Alias for toHtml

Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLTextarea::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLTextarea::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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLTextarea::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDisabled( $disabled) : \none
inherited

Sets the "disabled" attribute of an element.

Inherited from: \cHTMLFormElement::setDisabled()\cHTMLTextarea::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.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLTextarea::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLTextarea::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetHeight( $height) : \none
inherited

sets the maximum input length of the text box.

Inherited from: \cHTMLTextarea::setHeight()
Parameters
NameTypeDescription
$height
Returns
TypeDescription
\none
methodpublicsetID( $id) : void
Parameters
NameTypeDescription
$id
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

sets the tab index for this element.

Inherited from: \cHTMLFormElement::setTabindex()\cHTMLTextarea::setTabindex()

The tab index needs to be numeric, bigger than 0 and smaller than 32767.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublicsetValue( $value) : \none
inherited

sets the initial value of the text box.

Inherited from: \cHTMLTextarea::setValue()
Parameters
NameTypeDescription
$value

string Initial value

Returns
TypeDescription
\none
methodpublicsetWidth( $width) : \none
inherited

sets the width of the text box.

Inherited from: \cHTMLTextarea::setWidth()
Parameters
NameTypeDescription
$width

int width of the text box

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLTextarea::toHTML()
methodpublictoHtml() : string
inherited

Renders the textbox

Inherited from: \cHTMLTextarea::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cDataDropdownWidget

Package: Default
class cDataDropdownWidget cDataDropdownWidget generates a dropdown widget for use with the data objects.
Parent(s)
\cHTMLSelectElement < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLSelectElement::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLSelectElement::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLSelectElement::$$_contentlessTag  
>VPropertypublicarray $_options
inherited
All cHTMLOptionElements
Inherited from: \cHTMLSelectElement::$$_options
Details
Type
array
Inherited_from
\cHTMLSelectElement::$$_options  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLSelectElement::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLSelectElement::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLSelectElement::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLSelectElement::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLSelectElement::$$_skeleton_single  
>VPropertypublicstring $_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLSelectElement::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLSelectElement::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLSelectElement::$$_tag  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLSelectElement::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLSelectElement::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddOptionElement( $index,  $element) : \none
inherited

Adds an cHTMLOptionElement to the number of choices.

Inherited from: \cHTMLSelectElement::addOptionElement()
Parameters
NameTypeDescription
$index

string Index of the element

$element

object Filled cHTMLOptionElement to add

Returns
TypeDescription
\none
methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

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');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string

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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicautoFill( $stuff) : \none
inherited

Automatically creates and fills cHTMLOptionElements

Inherited from: \cHTMLSelectElement::autoFill()

Array format: $stuff = array( array("value","title"), array("value","title"));

or regular key => value arrays.

Parameters
NameTypeDescription
$stuff

array Array with all items

Returns
TypeDescription
\none
methodpubliccDataDropdownWidget( $name,  $parameters) : void

cDataDropdownWidget: Creates a dropdown widget with specific entries

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: default string Default value which will be selected choices array Values for filling the dropdown

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLSelectElement::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpubliccHTMLSelectElement( $name,  $width = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLSelectElement::cHTMLSelectElement()

Creates an HTML select field (aka "DropDown").

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpublicfillCloseSkeleton() : string
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

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.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetDefault() : \Selected
inherited

Search for the selected elements

Inherited from: \cHTMLSelectElement::getDefault()
Returns
TypeDescription
\Selected"lvalue"
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLSelectElement::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string
inherited

render(): Alias for toHtml

Inherited from: \cHTML::render()\cHTMLFormElement::render()\cHTMLSelectElement::render()
Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLSelectElement::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLSelectElement::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDefault( $lvalue) : \none
inherited

Sets a specific cHTMLOptionElement to the selected state.

Inherited from: \cHTMLSelectElement::setDefault()
Parameters
NameTypeDescription
$lvalue

string Specifies the "value" of the cHTMLOptionElement to set

Returns
TypeDescription
\none
methodpublicsetDisabled( $disabled) : \none
inherited

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.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLSelectElement::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLSelectElement::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
Parameters
NameTypeDescription
$id
methodpublicsetMultiselect() : void
inherited

Inherited from: \cHTMLSelectElement::setMultiselect()
methodpublicsetSelected(array $aElements) : \none
inherited

Sets specified elements as selected (and all others as unselected)

Inherited from: \cHTMLSelectElement::setSelected()
Parameters
NameTypeDescription
$aElementsarray

Array with "values" of the cHTMLOptionElement to set

Returns
TypeDescription
\none
methodpublicsetSize( $size) : void
inherited

Inherited from: \cHTMLSelectElement::setSize()
Parameters
NameTypeDescription
$size
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

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.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLSelectElement::toHTML()
methodpublictoHtml() : string
inherited

Renders the select box

Inherited from: \cHTMLSelectElement::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cDataForeignTableDropdownWidget

Package: Default
class cDataForeignTableDropdownWidget cDataForeignTableDropdownWidget generates a dropdown widget out of a foreign table.
Parent(s)
\cHTMLSelectElement < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLSelectElement::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLSelectElement::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLSelectElement::$$_contentlessTag  
>VPropertypublicarray $_options
inherited
All cHTMLOptionElements
Inherited from: \cHTMLSelectElement::$$_options
Details
Type
array
Inherited_from
\cHTMLSelectElement::$$_options  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLSelectElement::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLSelectElement::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLSelectElement::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLSelectElement::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLSelectElement::$$_skeleton_single  
>VPropertypublicstring $_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLSelectElement::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLSelectElement::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLSelectElement::$$_tag  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLSelectElement::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLSelectElement::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddOptionElement( $index,  $element) : \none
inherited

Adds an cHTMLOptionElement to the number of choices.

Inherited from: \cHTMLSelectElement::addOptionElement()
Parameters
NameTypeDescription
$index

string Index of the element

$element

object Filled cHTMLOptionElement to add

Returns
TypeDescription
\none
methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

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');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string

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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicautoFill( $stuff) : \none
inherited

Automatically creates and fills cHTMLOptionElements

Inherited from: \cHTMLSelectElement::autoFill()

Array format: $stuff = array( array("value","title"), array("value","title"));

or regular key => value arrays.

Parameters
NameTypeDescription
$stuff

array Array with all items

Returns
TypeDescription
\none
methodpubliccDataForeignTableDropdownWidget( $name,  $parameters) : void

cDataForeignTableDropdownWidget: Creates a dropdown widget which fetches its entries from a foreign, linked table

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: foreignClass string Class name of the foreign class default string Default value which will be selected

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLSelectElement::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpubliccHTMLSelectElement( $name,  $width = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLSelectElement::cHTMLSelectElement()

Creates an HTML select field (aka "DropDown").

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpublicfillCloseSkeleton() : string
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

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.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetDefault() : \Selected
inherited

Search for the selected elements

Inherited from: \cHTMLSelectElement::getDefault()
Returns
TypeDescription
\Selected"lvalue"
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLSelectElement::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string
inherited

render(): Alias for toHtml

Inherited from: \cHTML::render()\cHTMLFormElement::render()\cHTMLSelectElement::render()
Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLSelectElement::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLSelectElement::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDefault( $lvalue) : \none
inherited

Sets a specific cHTMLOptionElement to the selected state.

Inherited from: \cHTMLSelectElement::setDefault()
Parameters
NameTypeDescription
$lvalue

string Specifies the "value" of the cHTMLOptionElement to set

Returns
TypeDescription
\none
methodpublicsetDisabled( $disabled) : \none
inherited

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.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLSelectElement::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLSelectElement::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
Parameters
NameTypeDescription
$id
methodpublicsetMultiselect() : void
inherited

Inherited from: \cHTMLSelectElement::setMultiselect()
methodpublicsetSelected(array $aElements) : \none
inherited

Sets specified elements as selected (and all others as unselected)

Inherited from: \cHTMLSelectElement::setSelected()
Parameters
NameTypeDescription
$aElementsarray

Array with "values" of the cHTMLOptionElement to set

Returns
TypeDescription
\none
methodpublicsetSize( $size) : void
inherited

Inherited from: \cHTMLSelectElement::setSize()
Parameters
NameTypeDescription
$size
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

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.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLSelectElement::toHTML()
methodpublictoHtml() : string
inherited

Renders the select box

Inherited from: \cHTMLSelectElement::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cDataMultiTextboxWidget

Package: Default
class cDataMultiTextboxWidget cDataMultiTextboxWidget generates a multi-line textbox widget
Parent(s)
\cHTMLTable < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
inherited
Defines which JS events contain which scripts
Inherited from: \cHTML::$$_aEventDefinitions\cHTMLTable::$$_aEventDefinitions
Details
Type
n/a
Inherited_from
\cHTML::$$_aEventDefinitions  
Inherited_from
\cHTMLTable::$$_aEventDefinitions  
>VPropertypublic$_aStyleDefinitions
inherited
Style definitions
Inherited from: \cHTML::$$_aStyleDefinitions\cHTMLTable::$$_aStyleDefinitions
Details
Type
n/a
Inherited_from
\cHTML::$$_aStyleDefinitions  
Inherited_from
\cHTMLTable::$$_aStyleDefinitions  
>VPropertypublic$_content
inherited
The content itself
Inherited from: \cHTML::$$_content\cHTMLTable::$$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLTable::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLTable::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLTable::$$_contentlessTag  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLTable::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLTable::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
inherited
Storage of the close SGML tag
Inherited from: \cHTML::$$_skeleton_close\cHTMLTable::$$_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLTable::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
inherited
Storage of the open SGML tag template
Inherited from: \cHTML::$$_skeleton_open\cHTMLTable::$$_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLTable::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
inherited
Storage of a single SGML tag template
Inherited from: \cHTML::$$_skeleton_single\cHTMLTable::$$_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLTable::$$_skeleton_single  
>VPropertypublicstring $_styledefs
inherited
Defines the style definitions
Inherited from: \cHTML::$$_styledefs\cHTMLTable::$$_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLTable::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLTable::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLTable::$$_tag  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLTable::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLTable::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicaddRow( $data) : void

Parameters
NameTypeDescription
$data
methodpublicaddTitle( $title) : void

Parameters
NameTypeDescription
$title
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLTable::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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

attachEventDefinition: Attaches the code for an event

Inherited from: \cHTML::attachEventDefinition()\cHTMLTable::attachEventDefinition()

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string
inherited

attachStyleDefinition: Attaches a style definition.

Inherited from: \cHTML::attachStyleDefinition()\cHTMLTable::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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccDataMultiTextboxWidget( $name,  $parameters) : void

cDataMultiTextboxWidget: Creates a multi-line textbox widget

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: title string Title of the multi-line textbox widget default array Values (=lines) to fill

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLTable::cHTML()
methodpubliccHTMLTable() : void
inherited

Inherited from: \cHTMLTable::cHTMLTable()
methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

Inherited from: \cHTML::fillCloseSkeleton()\cHTMLTable::fillCloseSkeleton()
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

fillSkeleton: Fills the open SGML tag skeleton

Inherited from: \cHTML::fillSkeleton()\cHTMLTable::fillSkeleton()

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLTable::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string
inherited

render(): Alias for toHtml

Inherited from: \cHTML::render()\cHTMLTable::render()
Returns
TypeDescription
stringRendered HTML
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLTable::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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLTable::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetBorder(\border $border) : void
inherited

setBorder: Sets the table's border

Inherited from: \cHTMLTable::setBorder()
Parameters
NameTypeDescription
$border\border

Border size

methodpublicsetCellPadding( $cellpadding) : void
inherited

setCellPadding: Sets the padding between cells

Inherited from: \cHTMLTable::setCellPadding()
Parameters
NameTypeDescription
$cellpadding

Padding

methodpublicsetCellSpacing( $cellspacing) : void
inherited

setCellSpacing: Sets the spacing between cells

Inherited from: \cHTMLTable::setCellSpacing()
Parameters
NameTypeDescription
$cellspacing

Spacing

methodpublicsetClass( $class) : void
inherited

sets the CSS class

Inherited from: \cHTML::setClass()\cHTMLTable::setClass()
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContent( $content) : void
inherited

setContent: Sets the table's content

Inherited from: \cHTMLTable::setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLTable::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLTable::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
inherited

sets the ID class

Inherited from: \cHTML::setID()\cHTMLTable::setID()
Parameters
NameTypeDescription
$id
methodpublicsetPadding( $cellpadding) : void
inherited

Inherited from: \cHTMLTable::setPadding()
Parameters
NameTypeDescription
$cellpadding
methodpublicsetSpacing( $cellspacing) : void
inherited

Inherited from: \cHTMLTable::setSpacing()
Parameters
NameTypeDescription
$cellspacing
methodpublicsetStyle( $style) : void
inherited

sets the CSS style

Inherited from: \cHTML::setStyle()\cHTMLTable::setStyle()
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
inherited

addStyleDefinition

Inherited from: \cHTML::setStyleDefinition()\cHTMLTable::setStyleDefinition()
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetWidth( $width) : void
inherited

setWidth: Sets the table width

Inherited from: \cHTMLTable::setWidth()
Parameters
NameTypeDescription
$width

Width

methodpublictoHTML() : string
inherited

Renders the Table element

Inherited from: \cHTMLTable::toHTML()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void
inherited

removes an event handler

Inherited from: \cHTML::unsetEvent()\cHTMLTable::unsetEvent()

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cDataTextWidget

Package: Default
class cDataTextWidget cDataTextWidget generates a textbox widget for use with the data objects.
Parent(s)
\cHTMLTextbox < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
inherited
Defines which JS events contain which scripts
Inherited from: \cHTML::$$_aEventDefinitions\cHTMLFormElement::$$_aEventDefinitions\cHTMLTextbox::$$_aEventDefinitions
Details
Type
n/a
Inherited_from
\cHTML::$$_aEventDefinitions  
Inherited_from
\cHTMLFormElement::$$_aEventDefinitions  
Inherited_from
\cHTMLTextbox::$$_aEventDefinitions  
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLTextbox::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLTextbox::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLTextbox::$$_contentlessTag  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLTextbox::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLTextbox::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLTextbox::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
inherited
Storage of the open SGML tag template
Inherited from: \cHTML::$$_skeleton_open\cHTMLFormElement::$$_skeleton_open\cHTMLTextbox::$$_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLTextbox::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLTextbox::$$_skeleton_single  
>VPropertypublicstring $_styledefs
inherited
Defines the style definitions
Inherited from: \cHTML::$$_styledefs\cHTMLFormElement::$$_styledefs\cHTMLTextbox::$$_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLTextbox::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLTextbox::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLTextbox::$$_tag  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLTextbox::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLTextbox::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLTextbox::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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

attachEventDefinition: Attaches the code for an event

Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLTextbox::attachEventDefinition()

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string
inherited

attachStyleDefinition: Attaches a style definition.

Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLTextbox::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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccDataTextWidget( $name,  $parameters) : void

cDataTextWidget: Creates a text box widget

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: default Default value for this box

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextbox::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpubliccHTMLTextbox( $name,  $initvalue = "",  $width = "",  $maxlength = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLTextbox::cHTMLTextbox()

Creates an HTML text box.

If no additional parameters are specified, the default width is 20 units.

Parameters
NameTypeDescription
$name

string Name of the element

$initvalue

string Initial value of the box

$width

int width of the text box

$maxlength

int maximum input length of the box

$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

Returns
TypeDescription
\none
methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLTextbox::fillCloseSkeleton()
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

fillSkeleton: Fills the open SGML tag skeleton

Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLTextbox::fillSkeleton()

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLTextbox::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string
inherited

render(): Alias for toHtml

Inherited from: \cHTML::render()\cHTMLFormElement::render()\cHTMLTextbox::render()
Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLTextbox::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLTextbox::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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLTextbox::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDisabled( $disabled) : \none
inherited

Sets the "disabled" attribute of an element.

Inherited from: \cHTMLFormElement::setDisabled()\cHTMLTextbox::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.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLTextbox::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLTextbox::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetID( $id) : void
inherited

sets the ID class

Inherited from: \cHTML::setID()\cHTMLFormElement::setID()\cHTMLTextbox::setID()
Parameters
NameTypeDescription
$id
methodpublicsetMaxLength( $maxlen) : \none
inherited

sets the maximum input length of the text box.

Inherited from: \cHTMLTextbox::setMaxLength()
Parameters
NameTypeDescription
$maxlen

int maximum input length

Returns
TypeDescription
\none
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

sets the tab index for this element.

Inherited from: \cHTMLFormElement::setTabindex()\cHTMLTextbox::setTabindex()

The tab index needs to be numeric, bigger than 0 and smaller than 32767.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublicsetValue( $value) : \none
inherited

sets the initial value of the text box.

Inherited from: \cHTMLTextbox::setValue()
Parameters
NameTypeDescription
$value

string Initial value

Returns
TypeDescription
\none
methodpublicsetWidth( $width) : \none
inherited

sets the width of the text box.

Inherited from: \cHTMLTextbox::setWidth()
Parameters
NameTypeDescription
$width

int width of the text box

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLTextbox::toHTML()
methodpublictoHtml() : string
inherited

Renders the textbox

Inherited from: \cHTMLTextbox::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

\cDataTextareaWidget

Package: Default
class cDataTextareaWidget cDataTextareaWidget generates a textarea widget for use with the data objects.
Parent(s)
\cHTMLTextarea < \cHTMLFormElement < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

>VPropertypublic$_aEventDefinitions
inherited
Defines which JS events contain which scripts
Inherited from: \cHTML::$$_aEventDefinitions\cHTMLFormElement::$$_aEventDefinitions\cHTMLTextarea::$$_aEventDefinitions
>VPropertypublic$_content
Details
Type
n/a
Inherited_from
\cHTML::$$_content  
Inherited_from
\cHTMLFormElement::$$_content  
Inherited_from
\cHTMLTextarea::$$_content  
>VPropertypublicboolean $_contentlessTag
inherited
Defines if the current tag is a contentless tag
Inherited from: \cHTML::$$_contentlessTag\cHTMLFormElement::$$_contentlessTag\cHTMLTextarea::$$_contentlessTag
Details
Type
boolean
Access
private  
Inherited_from
\cHTML::$$_contentlessTag  
Inherited_from
\cHTMLFormElement::$$_contentlessTag  
Inherited_from
\cHTMLTextarea::$$_contentlessTag  
>VPropertypublicarray $_requiredScripts
inherited
Defines all scripts which are required by the current element
Inherited from: \cHTML::$$_requiredScripts\cHTMLFormElement::$$_requiredScripts\cHTMLTextarea::$$_requiredScripts
Details
Type
array
Access
private  
Inherited_from
\cHTML::$$_requiredScripts  
Inherited_from
\cHTMLFormElement::$$_requiredScripts  
Inherited_from
\cHTMLTextarea::$$_requiredScripts  
>VPropertypublicstring $_skeleton_close
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_close  
Inherited_from
\cHTMLFormElement::$$_skeleton_close  
Inherited_from
\cHTMLTextarea::$$_skeleton_close  
>VPropertypublicstring $_skeleton_open
inherited
Storage of the open SGML tag template
Inherited from: \cHTML::$$_skeleton_open\cHTMLFormElement::$$_skeleton_open\cHTMLTextarea::$$_skeleton_open
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_open  
Inherited_from
\cHTMLFormElement::$$_skeleton_open  
Inherited_from
\cHTMLTextarea::$$_skeleton_open  
>VPropertypublicstring $_skeleton_single
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_skeleton_single  
Inherited_from
\cHTMLFormElement::$$_skeleton_single  
Inherited_from
\cHTMLTextarea::$$_skeleton_single  
>VPropertypublicstring $_styledefs
inherited
Defines the style definitions
Inherited from: \cHTML::$$_styledefs\cHTMLFormElement::$$_styledefs\cHTMLTextarea::$$_styledefs
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_styledefs  
Inherited_from
\cHTMLFormElement::$$_styledefs  
Inherited_from
\cHTMLTextarea::$$_styledefs  
>VPropertypublicstring $_tag
inherited
Defines which tag to use
Inherited from: \cHTML::$$_tag\cHTMLFormElement::$$_tag\cHTMLTextarea::$$_tag
Details
Type
string
Access
private  
Inherited_from
\cHTML::$$_tag  
Inherited_from
\cHTMLFormElement::$$_tag  
Inherited_from
\cHTMLTextarea::$$_tag  
>VPropertypublic$_value
inheritedInherited from: \cHTMLTextarea::$$_value
Details
Type
n/a
Inherited_from
\cHTMLTextarea::$$_value  

Methods

methodpublic__toString() : string
inherited

Direct call of object as string will return it's generated markup.

Inherited from: \cHTML::__toString()\cHTMLFormElement::__toString()\cHTMLTextarea::__toString()
Returns
TypeDescription
stringGenerated markup
methodpublic_setContent( $content) : void
inherited

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLFormElement::_setContent()\cHTMLTextarea::_setContent()
Parameters
NameTypeDescription
$content

string/object String with the content or an object to render.

methodpublicaddRequiredScript( $script) : void
Parameters
NameTypeDescription
$script
methodpublicadvanceID() : void
inherited

advances to the next ID available in the system.

Inherited from: \cHTML::advanceID()\cHTMLFormElement::advanceID()\cHTMLTextarea::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.

methodpublicattachEventDefinition( $sName,  $sEvent,  $sCode) : void
inherited

attachEventDefinition: Attaches the code for an event

Inherited from: \cHTML::attachEventDefinition()\cHTMLFormElement::attachEventDefinition()\cHTMLTextarea::attachEventDefinition()

Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");

Parameters
NameTypeDescription
$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

methodpublicattachStyleDefinition( $sName,  $sDefinition) : string
inherited

attachStyleDefinition: Attaches a style definition.

Inherited from: \cHTML::attachStyleDefinition()\cHTMLFormElement::attachStyleDefinition()\cHTMLTextarea::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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccDataTextareaWidget( $name,  $parameters) : void

cDataTextareaWidget: Creates a text area widget

Parameters
NameTypeDescription
$name

Name of the widget

$parameters

Parameters (see below) valid parameters for this control are: default Default value for this area

Details
Access
public  
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLFormElement::cHTML()\cHTMLTextarea::cHTML()
methodpubliccHTMLFormElement( $name = "",  $id = "",  $disabled = "",  $tabindex = "",  $accesskey = "") : \none

This is a generic form element, where specific elements should be inherited from this class.

Parameters
NameTypeDescription
$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

Returns
TypeDescription
\none
methodpubliccHTMLTextarea( $name,  $initvalue = "",  $width = "",  $height = "",  $id = "",  $disabled = false,  $tabindex = null,  $accesskey = "") : \none
inherited

Constructor.

Inherited from: \cHTMLTextarea::cHTMLTextarea()

Creates an HTML text area.

If no additional parameters are specified, the default width is 60 chars, and the height is 5 chars.

Parameters
NameTypeDescription
$name

string Name of the element

$initvalue

string Initial value of the textarea

$width

int width of the textarea

$height

int height of the textarea

$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

Returns
TypeDescription
\none
methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

Inherited from: \cHTML::fillCloseSkeleton()\cHTMLFormElement::fillCloseSkeleton()\cHTMLTextarea::fillCloseSkeleton()
Returns
TypeDescription
stringfilled SGML closer skeleton
methodpublicfillSkeleton( $attributes) : string
inherited

fillSkeleton: Fills the open SGML tag skeleton

Inherited from: \cHTML::fillSkeleton()\cHTMLFormElement::fillSkeleton()\cHTMLTextarea::fillSkeleton()

fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.

Parameters
NameTypeDescription
$attributes

string Attributes to set

Returns
TypeDescription
stringfilled SGML opener skeleton
methodpublicgetID() : string
inherited

getID: returns the current ID

Inherited from: \cHTML::getID()\cHTMLFormElement::getID()\cHTMLTextarea::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string
inherited

render(): Alias for toHtml

Inherited from: \cHTML::render()\cHTMLFormElement::render()\cHTMLTextarea::render()
Returns
TypeDescription
stringRendered HTML
methodpublicsetAccessKey( $accesskey) : \none
inherited

sets the access key for this element.

Inherited from: \cHTMLFormElement::setAccessKey()\cHTMLTextarea::setAccessKey()
Parameters
NameTypeDescription
$accesskey

string The length of the access key. May be A-Z and 0-9.

Returns
TypeDescription
\none
methodpublicsetAlt( $alt) : void
inherited

setAlt: sets the alt and title attributes

Inherited from: \cHTML::setAlt()\cHTMLFormElement::setAlt()\cHTMLTextarea::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.

Parameters
NameTypeDescription
$alt

string Text to set as the "alt" attribute

methodpublicsetAttribute( $sAttributeName,  $sValue) : void
inherited

setAttribte: Sets a specific attribute

Inherited from: \cHTML::setAttribute()\cHTMLFormElement::setAttribute()\cHTMLTextarea::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDisabled( $disabled) : \none
inherited

Sets the "disabled" attribute of an element.

Inherited from: \cHTMLFormElement::setDisabled()\cHTMLTextarea::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.

Parameters
NameTypeDescription
$disabled

string Sets the disabled-flag if non-empty

Returns
TypeDescription
\none
methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLFormElement::setEvent()\cHTMLTextarea::setEvent()

example: $item->setEvent("change","document.forms[0].submit");

Parameters
NameTypeDescription
$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

methodpublicsetGenerateXHTML(bool $value) : void
staticinherited

Setter for static $_generateXHTML property

Inherited from: \cHTML::setGenerateXHTML()\cHTMLFormElement::setGenerateXHTML()\cHTMLTextarea::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetHeight( $height) : \none
inherited

sets the maximum input length of the text box.

Inherited from: \cHTMLTextarea::setHeight()
Parameters
NameTypeDescription
$height
Returns
TypeDescription
\none
methodpublicsetID( $id) : void
Parameters
NameTypeDescription
$id
methodpublicsetStyle( $style) : void
Parameters
NameTypeDescription
$style
methodpublicsetStyleDefinition( $entity,  $definition) : string
Parameters
NameTypeDescription
$entity

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublicsetTabindex( $tabindex) : \none
inherited

sets the tab index for this element.

Inherited from: \cHTMLFormElement::setTabindex()\cHTMLTextarea::setTabindex()

The tab index needs to be numeric, bigger than 0 and smaller than 32767.

Parameters
NameTypeDescription
$tabindex

int desired tab index

Returns
TypeDescription
\none
methodpublicsetValue( $value) : \none
inherited

sets the initial value of the text box.

Inherited from: \cHTMLTextarea::setValue()
Parameters
NameTypeDescription
$value

string Initial value

Returns
TypeDescription
\none
methodpublicsetWidth( $width) : \none
inherited

sets the width of the text box.

Inherited from: \cHTMLTextarea::setWidth()
Parameters
NameTypeDescription
$width

int width of the text box

Returns
TypeDescription
\none
methodpublictoHTML() : void
inherited

Renders the output If the tag

Inherited from: \cHTML::toHTML()\cHTMLFormElement::toHTML()\cHTMLTextarea::toHTML()
methodpublictoHtml() : string
inherited

Renders the textbox

Inherited from: \cHTMLTextarea::toHtml()
Returns
TypeDescription
stringRendered HTML
methodpublicunsetEvent( $event) : void

example: $item->unsetEvent("change");

Parameters
NameTypeDescription
$event

string Type of the event

Documentation was generated by phpDocumentor 2.0.0a12.