Regular page

author Timo A. Hummel

 Methods

Constructor Function Initializes the SGML open/close tags

__construct() : void
Inherited

inherited_from \cHTML::__construct()

_setContent: Sets the content of the object

_setContent(\$content $content) 
Inherited

inherited_from \cHTML::_setContent()

Parameters

$content

\$content

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

addRequiredScript()

addRequiredScript($script) 
Inherited

inherited_from \cHTML::addRequiredScript()

Parameters

$script

sets a specific JavaScript for the header Important: The passed script needs to define <script></script> tags.

addScript(\$name $name, \$script $script) 

Parameters

$name

\$name

string Script identifier

$script

\$script

string Script code

advances to the next ID available in the system.

advanceID() 
Inherited

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()

attachEventDefinition: Attaches the code for an event

attachEventDefinition(\$sName $sName, \$sEvent $sEvent, \$sCode $sCode) 
Inherited

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

inherited_from \cHTML::attachEventDefinition()

Parameters

$sName

\$sName

string defines the name of the event

$sEvent

\$sEvent

string defines the event (e.g. onClick)

$sCode

\$sCode

string defines the code

attachStyleDefinition: Attaches a style definition.

attachStyleDefinition(\$sName $sName, \$sDefinition $sDefinition) : string
Inherited

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()

Parameters

$sName

\$sName

string Name for a style definition

$sDefinition

\$sDefinition

string Definition for the given entity

Returns

stringfilled SGML closing skeleton

old Constructor

cHTML() 
Inherited

inherited_from \cHTML::cHTML()

Constructor Function

cPage($object) 

Parameters

$object

none

fillCloseSkeleton: Fills the close skeleton

fillCloseSkeleton() : string
Inherited

inherited_from \cHTML::fillCloseSkeleton()

Returns

stringfilled SGML closer skeleton

fillSkeleton: Fills the open SGML tag skeleton

fillSkeleton(\$attributes $attributes) : string
Inherited

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

inherited_from \cHTML::fillSkeleton()

Parameters

$attributes

\$attributes

string Attributes to set

Returns

stringfilled SGML opener skeleton

getID: returns the current ID

getID() : string
Inherited

inherited_from \cHTML::getID()

Returns

stringcurrent ID

render the page

render($print) : string

Parameters

$print

none

Returns

stringRendered HTML

setAlt: sets the alt and title attributes

setAlt(\$alt $alt) 
Inherited

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()

Parameters

$alt

\$alt

string Text to set as the "alt" attribute

setAttribte: Sets a specific attribute

setAttribute(\$sAttributeName $sAttributeName, \$sValue $sValue) 
Inherited

inherited_from \cHTML::setAttribute()

Parameters

$sAttributeName

\$sAttributeName

string Name of the attribute

$sValue

\$sValue

string Value of the attribute

sets the CSS class

setClass(\$class $class) 
Inherited

inherited_from \cHTML::setClass()

Parameters

$class

\$class

string Text to set as the "alt" attribute

Sets the content for the page

setContent(\$content $content) 

Parameters

$content

\$content

mixed Object with a render method or a string containing the content

setContentlessTag()

setContentlessTag(\type $contentlessTag) 
Inherited

inherited_from \cHTML::setContentlessTag()

Parameters

$contentlessTag

\type

setEncoding()

setEncoding($encoding) 

Parameters

$encoding

adds an "onXXX" javascript event handler

setEvent(\$event $event, \$action $action) 
Inherited

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

inherited_from \cHTML::setEvent()

Parameters

$event

\$event

string Type of the event

$action

\$action

string Function or action to call (JavaScript Code)

setExtra()

setExtra($extra) 

Parameters

$extra

sets the ID class

setID(\$class $id) 
Inherited

inherited_from \cHTML::setID()

Parameters

$id

\$class

string Text to set as the "id"

set the margin width (pixels)

setMargin(\$margin $margin) 

Parameters

$margin

\$margin

int Margin width

setMarkScript()

setMarkScript($item) 

Parameters

$item

adds the default script for a messagebox

setMessageBox() 

adds the default script to reload the left pane (frame 2)

setReload($location) 

Parameters

$location

none

sets the CSS style

setStyle(\$class $style) 
Inherited

inherited_from \cHTML::setStyle()

Parameters

$style

\$class

string Text to set as the "alt" attribute

addStyleDefinition

setStyleDefinition(\$entity $entity, \$definition $definition) : string
Inherited

inherited_from \cHTML::setStyleDefinition()

Parameters

$entity

\$entity

string Entity to define

$definition

\$definition

string Definition for the given entity

Returns

stringfilled SGML closing skeleton

sets the link to the subnavigation. Should be set on the first page only.

setSubnav(\$append $append, $marea) 

Parameters

$append

\$append

URL to append

$marea

Renders the output If the tag

toHTML() 
Inherited

inherited_from \cHTML::toHTML()

removes an event handler

unsetEvent(\$event $event) 
Inherited

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

inherited_from \cHTML::unsetEvent()

Parameters

$event

\$event

string Type of the event

 Properties

 

Defines which JS events contain which scripts

$_aEventDefinitions 
Inherited

inherited_from \cHTML::$$_aEventDefinitions
 

Style definitions

$_aStyleDefinitions 
Inherited

inherited_from \cHTML::$$_aStyleDefinitions
 

Storage of the page's content

$_content : string

access private
 

Defines if the current tag is a contentless tag

$_contentlessTag : boolean
Inherited

access private
inherited_from \cHTML::$$_contentlessTag
 

Storage of the desired encoding

$_encoding : string

access private
 

Storage of the margin

$_margin : int

access private
 

Defines all scripts which are required by the current element

$_requiredScripts : array
Inherited

access private
inherited_from \cHTML::$$_requiredScripts
 

Storage of scripts to be used on the page

$_scripts : array

access private
 

Storage of the close SGML tag

$_skeleton_close : string
Inherited

access private
inherited_from \cHTML::$$_skeleton_close
 

Storage of the open SGML tag template

$_skeleton_open : string
Inherited

access private
inherited_from \cHTML::$$_skeleton_open
 

Storage of a single SGML tag template

$_skeleton_single : string
Inherited

access private
inherited_from \cHTML::$$_skeleton_single
 

Defines the style definitions

$_styledefs : string
Inherited

access private
inherited_from \cHTML::$$_styledefs
 

Storage of the sub navigation

$_subnav : string

access private
 

Defines which tag to use

$_tag : string
Inherited

access private
inherited_from \cHTML::$$_tag
 

Storage of the extra data (see template)

$extra : string

access private