contenido\classes\widgets\class.widgets.buttons.php
Description: Button Widgets
Requirements:
- Author
- Bjoern Behrens
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- {@internal created 2005-08-22 $Id: class.widgets.buttons.php,v 1.6 2005/08/22 12:20:23 timo.hummel Exp $ }}
- Package
- Contenido Backend classes
- Version
- 1.12
\cWidgetButton
- Parent(s)
- \cHTMLSpan < \cHTML < \HTML_Common
- Children
- \cWidgetToggleButton
- \cWidgetMultiToggleButton
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLSpan::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLSpan::$$_aStyleDefinitions

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLSpan::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLSpan::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLSpan::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLSpan::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLSpan::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLSpan::$$_styledefs

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

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

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

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

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

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLSpan::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 |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLSpan::cHTML()
cHTMLSpan( $content = "") : voidCreates an HTML DIV element.
| Name | Type | Description |
|---|---|---|
| $content | mixed String or object with the contents |

cWidgetButton( $img, $alt, $link) : voidConstructor Function
| Name | Type | Description |
|---|---|---|
| $img | string Image location | |
| $alt | string Alternative text | |
| $link | string Link |

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

fillSkeleton( $attributes) : stringfillSkeleton: Fills the open SGML tag skeleton
Inherited from: \cHTML::fillSkeleton()\cHTMLSpan::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 |

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

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

setBorder( $border) : voidsets the border width
| Name | Type | Description |
|---|---|---|
| $border | integer border size |

setClass( $class) : void| Name | Type | Description |
|---|---|---|
| $class | string Text to set as the "alt" attribute |

setContent( $content) : void| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

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

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

setHover( $hover) : voidSets wether the button should be hovered
| Name | Type | Description |
|---|---|---|
| $hover | boolean True if hovering should be used |

setIndent( $indent) : voidSets wether the button should be indented when clicking
| Name | Type | Description |
|---|---|---|
| $indent | boolean True if indenting should be used |

setStyleDefinition( $entity, $definition) : stringaddStyleDefinition
Inherited from: \cHTML::setStyleDefinition()\cHTMLSpan::setStyleDefinition()| Name | Type | Description |
|---|---|---|
| $entity | string Entity to define | |
| $definition | string Definition for the given entity |
| Type | Description |
|---|---|
| string | filled SGML closing skeleton |
\cWidgetMultiToggleButton
- Parent(s)
- \cWidgetButton < \cHTMLSpan < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLSpan::$$_aEventDefinitions
- Inherited_from
- \cWidgetButton::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLSpan::$$_aStyleDefinitions
- Inherited_from
- \cWidgetButton::$$_aStyleDefinitions

$_content- Type
- n/a
- Inherited_from
- \cHTML::$$_content
- Inherited_from
- \cHTMLSpan::$$_content
- Inherited_from
- \cWidgetButton::$$_content

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLSpan::$$_contentlessTag
- Inherited_from
- \cWidgetButton::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLSpan::$$_requiredScripts
- Inherited_from
- \cWidgetButton::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLSpan::$$_skeleton_close
- Inherited_from
- \cWidgetButton::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLSpan::$$_skeleton_open
- Inherited_from
- \cWidgetButton::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLSpan::$$_skeleton_single
- Inherited_from
- \cWidgetButton::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLSpan::$$_styledefs
- Inherited_from
- \cWidgetButton::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLSpan::$$_tag
- Inherited_from
- \cWidgetButton::$$_tag
Methods

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

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

addLinkedItem( $item) : voidlinks to another cWidgetMultiToggleButton (or any derived class) for automatically updating other buttons.
| Name | Type | Description |
|---|---|---|
| $item | mixed Either another cWidgetMultiToggleButton (or derivates) or the ID of the target button. |

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

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

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

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLSpan::attachStyleDefinition()\cWidgetButton::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 |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLSpan::cHTML()\cWidgetButton::cHTML()
cHTMLSpan( $content = "") : voidCreates an HTML DIV element.
| Name | Type | Description |
|---|---|---|
| $content | mixed String or object with the contents |

cWidgetButton( $img, $alt, $link) : void| Name | Type | Description |
|---|---|---|
| $img | string Image location | |
| $alt | string Alternative text | |
| $link | string Link |

cWidgetMultiToggleButton( $img, $alt, $link) : voidConstructor Function
| Name | Type | Description |
|---|---|---|
| $img | string Image location | |
| $alt | string Alternative text | |
| $link |

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

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

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

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

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

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

setContent( $content) : voidsetContent: Sets the div's content
Inherited from: \cHTMLSpan::setContent()\cWidgetButton::setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

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

setDefault( $default = true) : voidSets or deletes the default state for this button.
Warning: This method doesn't update other buttons.
| Name | Type | Description |
|---|---|---|
| $default | boolean If true, this button is a default (e.g. pushed) button. |

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

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

setHint( $object, $hint) : voidSets that the specified object receives a hint whenever the button is hovered.
| Name | Type | Description |
|---|---|---|
| $object | string ID of the object which receives the hint | |
| $hint | string Text to display |

setIndent( $indent) : voidSets wether the button should be indented when clicking
Inherited from: \cWidgetButton::setIndent()| Name | Type | Description |
|---|---|---|
| $indent | boolean True if indenting should be used |

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

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

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLSpan::unsetEvent()\cWidgetButton::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |
\cWidgetToggleButton
- Parent(s)
- \cWidgetButton < \cHTMLSpan < \cHTML < \HTML_Common
- Author
- Timo A. Hummel
Properties

$_aEventDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aEventDefinitions
- Inherited_from
- \cHTMLSpan::$$_aEventDefinitions
- Inherited_from
- \cWidgetButton::$$_aEventDefinitions

$_aStyleDefinitions- Type
- n/a
- Inherited_from
- \cHTML::$$_aStyleDefinitions
- Inherited_from
- \cHTMLSpan::$$_aStyleDefinitions
- Inherited_from
- \cWidgetButton::$$_aStyleDefinitions

$_content- Type
- n/a
- Inherited_from
- \cHTML::$$_content
- Inherited_from
- \cHTMLSpan::$$_content
- Inherited_from
- \cWidgetButton::$$_content

boolean $_contentlessTag- Type
- boolean
- Access
- private
- Inherited_from
- \cHTML::$$_contentlessTag
- Inherited_from
- \cHTMLSpan::$$_contentlessTag
- Inherited_from
- \cWidgetButton::$$_contentlessTag

array $_requiredScripts- Type
- array
- Access
- private
- Inherited_from
- \cHTML::$$_requiredScripts
- Inherited_from
- \cHTMLSpan::$$_requiredScripts
- Inherited_from
- \cWidgetButton::$$_requiredScripts

string $_skeleton_close- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_close
- Inherited_from
- \cHTMLSpan::$$_skeleton_close
- Inherited_from
- \cWidgetButton::$$_skeleton_close

string $_skeleton_open- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_open
- Inherited_from
- \cHTMLSpan::$$_skeleton_open
- Inherited_from
- \cWidgetButton::$$_skeleton_open

string $_skeleton_single- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_skeleton_single
- Inherited_from
- \cHTMLSpan::$$_skeleton_single
- Inherited_from
- \cWidgetButton::$$_skeleton_single

string $_styledefs- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_styledefs
- Inherited_from
- \cHTMLSpan::$$_styledefs
- Inherited_from
- \cWidgetButton::$$_styledefs

string $_tag- Type
- string
- Access
- private
- Inherited_from
- \cHTML::$$_tag
- Inherited_from
- \cHTMLSpan::$$_tag
- Inherited_from
- \cWidgetButton::$$_tag
Methods

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

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

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

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

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

attachStyleDefinition( $sName, $sDefinition) : stringattachStyleDefinition: Attaches a style definition.
Inherited from: \cHTML::attachStyleDefinition()\cHTMLSpan::attachStyleDefinition()\cWidgetButton::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 |

cHTML() : voidConstructor Function Initializes the SGML open/close tags
Inherited from: \cHTML::cHTML()\cHTMLSpan::cHTML()\cWidgetButton::cHTML()
cHTMLSpan( $content = "") : voidCreates an HTML DIV element.
| Name | Type | Description |
|---|---|---|
| $content | mixed String or object with the contents |

cWidgetButton( $img, $alt, $link) : void| Name | Type | Description |
|---|---|---|
| $img | string Image location | |
| $alt | string Alternative text | |
| $link | string Link |

cWidgetToggleButton( $img, $alt, $uplink, $downlink) : voidConstructor Function
| Name | Type | Description |
|---|---|---|
| $img | string Image location | |
| $alt | string Alternative text | |
| $uplink | string Link when the button is turned off (=up) | |
| $downlink | string Link when the button is turned on (=down) |

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

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

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

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

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

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

setContent( $content) : voidsetContent: Sets the div's content
Inherited from: \cHTMLSpan::setContent()\cWidgetButton::setContent()| Name | Type | Description |
|---|---|---|
| $content | string/object String with the content or an object to render. |

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

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

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

setIndent( $indent) : voidSets wether the button should be indented when clicking
Inherited from: \cWidgetButton::setIndent()| Name | Type | Description |
|---|---|---|
| $indent | boolean True if indenting should be used |

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

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

unsetEvent( $event) : voidremoves an event handler
Inherited from: \cHTML::unsetEvent()\cHTMLSpan::unsetEvent()\cWidgetButton::unsetEvent()example: $item->unsetEvent("change");
| Name | Type | Description |
|---|---|---|
| $event | string Type of the event |