__construct()
_setContent()
addRequiredScript()
advanceID()
attachEventDefinition()
attachStyleDefinition()
cHTML()
cHTMLSpan()
cWidgetButton()
cWidgetToggleButton()
fillCloseSkeleton()
fillSkeleton()
getID()
render()
setAlt()
setAttribute()
setBorder()
setClass()
setContent()
setContentlessTag()
setEvent()
setHover()
setID()
setIndent()
setStyle()
setStyleDefinition()
toHTML()
unsetEvent()
$_aEventDefinitions
$_aStyleDefinitions
$_content
$_contentlessTag
$_img
$_link
$_requiredScripts
$_skeleton_close
$_skeleton_open
$_skeleton_single
$_styledefs
$_tag
Toggle button (on/off) with two different links
| author | Timo A. Hummel |
|---|
__construct() : void
| inherited_from | \cHTML::__construct() |
|---|---|
| inherited_from | \cHTMLSpan::__construct() |
| inherited_from | \cWidgetButton::__construct() |
_setContent(\$content $content)
| inherited_from | \cHTML::_setContent() |
|---|---|
| inherited_from | \cHTMLSpan::_setContent() |
| inherited_from | \cWidgetButton::_setContent() |
\$contentstring/object String with the content or an object to render.
addRequiredScript($script)
| inherited_from | \cHTML::addRequiredScript() |
|---|---|
| inherited_from | \cHTMLSpan::addRequiredScript() |
| inherited_from | \cWidgetButton::addRequiredScript() |
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.
| inherited_from | \cHTML::advanceID() |
|---|---|
| inherited_from | \cHTMLSpan::advanceID() |
| inherited_from | \cWidgetButton::advanceID() |
attachEventDefinition(\$sName $sName, \$sEvent $sEvent, \$sCode $sCode)
Example to attach an onClick handler: setEventDefinition("foo", "onClick", "alert('foo');");
| inherited_from | \cHTML::attachEventDefinition() |
|---|---|
| inherited_from | \cHTMLSpan::attachEventDefinition() |
| inherited_from | \cWidgetButton::attachEventDefinition() |
\$sNamestring defines the name of the event
\$sEventstring defines the event (e.g. onClick)
\$sCodestring defines the code
attachStyleDefinition(\$sName $sName, \$sDefinition $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;"
| inherited_from | \cHTML::attachStyleDefinition() |
|---|---|
| inherited_from | \cHTMLSpan::attachStyleDefinition() |
| inherited_from | \cWidgetButton::attachStyleDefinition() |
\$sNamestring Name for a style definition
\$sDefinitionstring Definition for the given entity
stringfilled SGML closing skeletoncHTML()
| inherited_from | \cHTML::cHTML() |
|---|---|
| inherited_from | \cHTMLSpan::cHTML() |
| inherited_from | \cWidgetButton::cHTML() |
cHTMLSpan(\$content $content)
| inherited_from | \cHTMLSpan::cHTMLSpan() |
|---|---|
| inherited_from | \cWidgetButton::cHTMLSpan() |
\$contentmixed String or object with the contents
cWidgetButton(\$img $img, \$alt $alt, \$link $link)
| inherited_from | \cWidgetButton::cWidgetButton() |
|---|
\$imgstring Image location
\$altstring Alternative text
\$linkstring Link
cWidgetToggleButton(\$img $img, \$alt $alt, \$uplink $uplink, \$downlink $downlink)
\$imgstring Image location
\$altstring Alternative text
\$uplinkstring Link when the button is turned off (=up)
\$downlinkstring Link when the button is turned on (=down)
fillCloseSkeleton() : string
| inherited_from | \cHTML::fillCloseSkeleton() |
|---|---|
| inherited_from | \cHTMLSpan::fillCloseSkeleton() |
| inherited_from | \cWidgetButton::fillCloseSkeleton() |
stringfilled SGML closer skeletonfillSkeleton(\$attributes $attributes) : string
fillSkeleton fills the SGML opener tag with the specified attributes. Attributes need to be passed in the stringyfied variant.
| inherited_from | \cHTML::fillSkeleton() |
|---|---|
| inherited_from | \cHTMLSpan::fillSkeleton() |
| inherited_from | \cWidgetButton::fillSkeleton() |
\$attributesstring Attributes to set
stringfilled SGML opener skeletongetID() : string
| inherited_from | \cHTML::getID() |
|---|---|
| inherited_from | \cHTMLSpan::getID() |
| inherited_from | \cWidgetButton::getID() |
stringcurrent IDrender() : string
stringRendered HTMLsetAlt(\$alt $alt)
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.
| inherited_from | \cHTML::setAlt() |
|---|---|
| inherited_from | \cHTMLSpan::setAlt() |
| inherited_from | \cWidgetButton::setAlt() |
\$altstring Text to set as the "alt" attribute
setAttribute(\$sAttributeName $sAttributeName, \$sValue $sValue)
| inherited_from | \cHTML::setAttribute() |
|---|---|
| inherited_from | \cHTMLSpan::setAttribute() |
| inherited_from | \cWidgetButton::setAttribute() |
\$sAttributeNamestring Name of the attribute
\$sValuestring Value of the attribute
setBorder(\$border $border)
| inherited_from | \cWidgetButton::setBorder() |
|---|
\$borderinteger border size
setClass(\$class $class)
| inherited_from | \cHTML::setClass() |
|---|---|
| inherited_from | \cHTMLSpan::setClass() |
| inherited_from | \cWidgetButton::setClass() |
\$classstring Text to set as the "alt" attribute
setContent(\$content $content)
| inherited_from | \cHTMLSpan::setContent() |
|---|---|
| inherited_from | \cWidgetButton::setContent() |
\$contentstring/object String with the content or an object to render.
setContentlessTag(\type $contentlessTag)
| inherited_from | \cHTML::setContentlessTag() |
|---|---|
| inherited_from | \cHTMLSpan::setContentlessTag() |
| inherited_from | \cWidgetButton::setContentlessTag() |
\type
setEvent(\$event $event, \$action $action)
example: $item->setEvent("change","document.forms[0].submit");
| inherited_from | \cHTML::setEvent() |
|---|---|
| inherited_from | \cHTMLSpan::setEvent() |
| inherited_from | \cWidgetButton::setEvent() |
\$eventstring Type of the event
\$actionstring Function or action to call (JavaScript Code)
setHover(\$hover $hover)
| inherited_from | \cWidgetButton::setHover() |
|---|
\$hoverboolean True if hovering should be used
setID(\$class $id)
| inherited_from | \cHTML::setID() |
|---|---|
| inherited_from | \cHTMLSpan::setID() |
| inherited_from | \cWidgetButton::setID() |
\$classstring Text to set as the "id"
setIndent(\$indent $indent)
| inherited_from | \cWidgetButton::setIndent() |
|---|
\$indentboolean True if indenting should be used
setStyle(\$class $style)
| inherited_from | \cHTML::setStyle() |
|---|---|
| inherited_from | \cHTMLSpan::setStyle() |
| inherited_from | \cWidgetButton::setStyle() |
\$classstring Text to set as the "alt" attribute
setStyleDefinition(\$entity $entity, \$definition $definition) : string
| inherited_from | \cHTML::setStyleDefinition() |
|---|---|
| inherited_from | \cHTMLSpan::setStyleDefinition() |
| inherited_from | \cWidgetButton::setStyleDefinition() |
\$entitystring Entity to define
\$definitionstring Definition for the given entity
stringfilled SGML closing skeletontoHTML() : string
| inherited_from | \cHTMLSpan::toHTML() |
|---|---|
| inherited_from | \cWidgetButton::toHTML() |
stringRendered HTMLunsetEvent(\$event $event)
example: $item->unsetEvent("change");
| inherited_from | \cHTML::unsetEvent() |
|---|---|
| inherited_from | \cHTMLSpan::unsetEvent() |
| inherited_from | \cWidgetButton::unsetEvent() |
\$eventstring Type of the event
$_aEventDefinitions
| inherited_from | \cHTML::$$_aEventDefinitions |
|---|---|
| inherited_from | \cHTMLSpan::$$_aEventDefinitions |
| inherited_from | \cWidgetButton::$$_aEventDefinitions |
$_aStyleDefinitions
| inherited_from | \cHTML::$$_aStyleDefinitions |
|---|---|
| inherited_from | \cHTMLSpan::$$_aStyleDefinitions |
| inherited_from | \cWidgetButton::$$_aStyleDefinitions |
$_content
| inherited_from | \cHTML::$$_content |
|---|---|
| inherited_from | \cHTMLSpan::$$_content |
| inherited_from | \cWidgetButton::$$_content |
$_contentlessTag : boolean
| access | private |
|---|---|
| inherited_from | \cHTML::$$_contentlessTag |
| inherited_from | \cHTMLSpan::$$_contentlessTag |
| inherited_from | \cWidgetButton::$$_contentlessTag |
$_img : object
| access | private |
|---|---|
| inherited_from | \cWidgetButton::$$_img |
$_link : object
| access | private |
|---|---|
| inherited_from | \cWidgetButton::$$_link |
$_requiredScripts : array
| access | private |
|---|---|
| inherited_from | \cHTML::$$_requiredScripts |
| inherited_from | \cHTMLSpan::$$_requiredScripts |
| inherited_from | \cWidgetButton::$$_requiredScripts |
$_skeleton_close : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_skeleton_close |
| inherited_from | \cHTMLSpan::$$_skeleton_close |
| inherited_from | \cWidgetButton::$$_skeleton_close |
$_skeleton_open : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_skeleton_open |
| inherited_from | \cHTMLSpan::$$_skeleton_open |
| inherited_from | \cWidgetButton::$$_skeleton_open |
$_skeleton_single : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_skeleton_single |
| inherited_from | \cHTMLSpan::$$_skeleton_single |
| inherited_from | \cWidgetButton::$$_skeleton_single |
$_styledefs : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_styledefs |
| inherited_from | \cHTMLSpan::$$_styledefs |
| inherited_from | \cWidgetButton::$$_styledefs |
$_tag : string
| access | private |
|---|---|
| inherited_from | \cHTML::$$_tag |
| inherited_from | \cHTMLSpan::$$_tag |
| inherited_from | \cWidgetButton::$$_tag |