contenido\classes\widgets\class.widgets.buttons.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

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

Package: Default
Regular push button with hover and push effect
Parent(s)
\cHTMLSpan < \cHTML < \HTML_Common
Children
\cWidgetToggleButton
\cWidgetMultiToggleButton
Author
Timo A. Hummel  

Properties

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

Methods

methodpublic__toString() : string
inherited

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

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

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLSpan::_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()\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.

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

attachEventDefinition: Attaches the code for an event

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

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLSpan::cHTML()
methodpubliccHTMLSpan( $content = "") : void
inherited

Constructor.

Inherited from: \cHTMLSpan::cHTMLSpan()

Creates an HTML DIV element.

Parameters
NameTypeDescription
$content

mixed String or object with the contents

methodpubliccWidgetButton( $img,  $alt,  $link) : void

Constructor Function

Parameters
NameTypeDescription
$img

string Image location

$alt

string Alternative text

$link

string Link

methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

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

fillSkeleton: 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.

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()\cHTMLSpan::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

Render method

Returns
TypeDescription
stringRendered HTML
methodpublicsetAlt( $alt) : void
inherited

setAlt: 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.

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()\cHTMLSpan::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetBorder( $border) : void

sets the border width

Parameters
NameTypeDescription
$border

integer border size

methodpublicsetClass( $class) : void
inherited

sets the CSS class

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

string Text to set as the "alt" attribute

methodpublicsetContent( $content) : void
inherited

setContent: Sets the div's content

Inherited from: \cHTMLSpan::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()\cHTMLSpan::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()\cHTMLSpan::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetHover( $hover) : void

Sets wether the button should be hovered

Parameters
NameTypeDescription
$hover

boolean True if hovering should be used

methodpublicsetID( $id) : void
inherited

sets the ID class

Inherited from: \cHTML::setID()\cHTMLSpan::setID()
Parameters
NameTypeDescription
$id
methodpublicsetIndent( $indent) : void

Sets wether the button should be indented when clicking

Parameters
NameTypeDescription
$indent

boolean True if indenting should be used

methodpublicsetStyle( $style) : void
inherited

sets the CSS style

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

addStyleDefinition

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

string Entity to define

$definition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpublictoHTML() : string
inherited

Renders the SPAN element

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

removes an event handler

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

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

Parameters
NameTypeDescription
$event

string Type of the event

\cWidgetMultiToggleButton

Package: Default
Toggle buttons for creating a grouped set of buttons
Parent(s)
\cWidgetButton < \cHTMLSpan < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

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

Methods

methodpublic__toString() : string
inherited

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

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

_setContent: Sets the content of the object

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

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

methodpublicaddLinkedItem( $item) : void

links to another cWidgetMultiToggleButton (or any derived class) for automatically updating other buttons.

Parameters
NameTypeDescription
$item

mixed Either another cWidgetMultiToggleButton (or derivates) or the ID of the target button.

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

advances 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.

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

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

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()\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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLSpan::cHTML()\cWidgetButton::cHTML()
methodpubliccHTMLSpan( $content = "") : void
inherited

Constructor.

Inherited from: \cHTMLSpan::cHTMLSpan()\cWidgetButton::cHTMLSpan()

Creates an HTML DIV element.

Parameters
NameTypeDescription
$content

mixed String or object with the contents

methodpubliccWidgetButton( $img,  $alt,  $link) : void
inherited

Constructor Function

Inherited from: \cWidgetButton::cWidgetButton()
Parameters
NameTypeDescription
$img

string Image location

$alt

string Alternative text

$link

string Link

methodpubliccWidgetMultiToggleButton( $img,  $alt,  $link) : void

Constructor Function

Parameters
NameTypeDescription
$img

string Image location

$alt

string Alternative text

$link
methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

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

fillSkeleton: 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.

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()\cHTMLSpan::getID()\cWidgetButton::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

Render method

Returns
TypeDescription
stringRendered HTML
methodpublicsetAlt( $alt) : void
inherited

setAlt: 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.

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()\cHTMLSpan::setAttribute()\cWidgetButton::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetBorder( $border) : void
inherited

sets the border width

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

integer border size

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContent( $content) : void
inherited

setContent: Sets the div's content

Inherited from: \cHTMLSpan::setContent()\cWidgetButton::setContent()
Parameters
NameTypeDescription
$content

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

methodpublicsetContentlessTag( $contentlessTag = true) : void
Parameters
NameTypeDescription
$contentlessTag
methodpublicsetDefault( $default = true) : void

Sets or deletes the default state for this button.

Warning: This method doesn't update other buttons.

Parameters
NameTypeDescription
$default

boolean If true, this button is a default (e.g. pushed) button.

methodpublicsetEvent( $event,  $action) : void
inherited

adds an "onXXX" javascript event handler

Inherited from: \cHTML::setEvent()\cHTMLSpan::setEvent()\cWidgetButton::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()\cHTMLSpan::setGenerateXHTML()\cWidgetButton::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetHint( $object,  $hint) : void

Sets that the specified object receives a hint whenever the button is hovered.

Parameters
NameTypeDescription
$object

string ID of the object which receives the hint

$hint

string Text to display

methodpublicsetHover( $hover) : void
inherited

Sets wether the button should be hovered

Inherited from: \cWidgetButton::setHover()
Parameters
NameTypeDescription
$hover

boolean True if hovering should be used

methodpublicsetID( $id) : void
inherited

sets the ID class

Inherited from: \cHTML::setID()\cHTMLSpan::setID()\cWidgetButton::setID()
Parameters
NameTypeDescription
$id
methodpublicsetIndent( $indent) : void
inherited

Sets wether the button should be indented when clicking

Inherited from: \cWidgetButton::setIndent()
Parameters
NameTypeDescription
$indent

boolean True if indenting should be used

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
methodpublictoHTML() : string
inherited

Renders the SPAN element

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

removes an event handler

Inherited from: \cHTML::unsetEvent()\cHTMLSpan::unsetEvent()\cWidgetButton::unsetEvent()

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

Parameters
NameTypeDescription
$event

string Type of the event

\cWidgetToggleButton

Package: Default
Toggle button (on/off) with two different links
Parent(s)
\cWidgetButton < \cHTMLSpan < \cHTML < \HTML_Common
Author
Timo A. Hummel  

Properties

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

Methods

methodpublic__toString() : string
inherited

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

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

_setContent: Sets the content of the object

Inherited from: \cHTML::_setContent()\cHTMLSpan::_setContent()\cWidgetButton::_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()\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.

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

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

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()\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;"

Parameters
NameTypeDescription
$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns
TypeDescription
stringfilled SGML closing skeleton
methodpubliccHTML() : void
inherited

Constructor Function Initializes the SGML open/close tags

Inherited from: \cHTML::cHTML()\cHTMLSpan::cHTML()\cWidgetButton::cHTML()
methodpubliccHTMLSpan( $content = "") : void
inherited

Constructor.

Inherited from: \cHTMLSpan::cHTMLSpan()\cWidgetButton::cHTMLSpan()

Creates an HTML DIV element.

Parameters
NameTypeDescription
$content

mixed String or object with the contents

methodpubliccWidgetButton( $img,  $alt,  $link) : void
inherited

Constructor Function

Inherited from: \cWidgetButton::cWidgetButton()
Parameters
NameTypeDescription
$img

string Image location

$alt

string Alternative text

$link

string Link

methodpubliccWidgetToggleButton( $img,  $alt,  $uplink,  $downlink) : void

Constructor Function

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

methodpublicfillCloseSkeleton() : string
inherited

fillCloseSkeleton: Fills the close skeleton

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

fillSkeleton: 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.

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()\cHTMLSpan::getID()\cWidgetButton::getID()
Returns
TypeDescription
stringcurrent ID
methodpublicrender() : string

Render method

Returns
TypeDescription
stringRendered HTML
methodpublicsetAlt( $alt) : void
inherited

setAlt: 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.

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()\cHTMLSpan::setAttribute()\cWidgetButton::setAttribute()
Parameters
NameTypeDescription
$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

methodpublicsetBorder( $border) : void
inherited

sets the border width

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

integer border size

methodpublicsetClass( $class) : void
Parameters
NameTypeDescription
$class

string Text to set as the "alt" attribute

methodpublicsetContent( $content) : void
inherited

setContent: Sets the div's content

Inherited from: \cHTMLSpan::setContent()\cWidgetButton::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()\cHTMLSpan::setEvent()\cWidgetButton::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()\cHTMLSpan::setGenerateXHTML()\cWidgetButton::setGenerateXHTML()
Parameters
NameTypeDescription
$valuebool
methodpublicsetHover( $hover) : void
inherited

Sets wether the button should be hovered

Inherited from: \cWidgetButton::setHover()
Parameters
NameTypeDescription
$hover

boolean True if hovering should be used

methodpublicsetID( $id) : void
inherited

sets the ID class

Inherited from: \cHTML::setID()\cHTMLSpan::setID()\cWidgetButton::setID()
Parameters
NameTypeDescription
$id
methodpublicsetIndent( $indent) : void
inherited

Sets wether the button should be indented when clicking

Inherited from: \cWidgetButton::setIndent()
Parameters
NameTypeDescription
$indent

boolean True if indenting should be used

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
methodpublictoHTML() : string
inherited

Renders the SPAN element

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

removes an event handler

Inherited from: \cHTML::unsetEvent()\cHTMLSpan::unsetEvent()\cWidgetButton::unsetEvent()

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

Parameters
NameTypeDescription
$event

string Type of the event

Documentation was generated by phpDocumentor 2.0.0a12.