HTML Link

author Timo A. Hummel

 Methods

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

__toString() : string
Inherited
inherited_from \cHTML::__toString()
inherited_from \cHTMLLink::__toString()

Returns

stringGenerated markup

_setContent: Sets the content of the object

_setContent($content) 
Inherited
inherited_from \cHTML::_setContent()
inherited_from \cHTMLLink::_setContent()

Parameters

$content

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

addRequiredScript()

addRequiredScript($script) 
Inherited
inherited_from \cHTML::addRequiredScript()
inherited_from \cHTMLLink::addRequiredScript()

Parameters

$script

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()
inherited_from \cHTMLLink::advanceID()

attachEventDefinition: Attaches the code for an event

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

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

inherited_from \cHTML::attachEventDefinition()
inherited_from \cHTMLLink::attachEventDefinition()

Parameters

$sName

string defines the name of the event

$sEvent

string defines the event (e.g. onClick)

$sCode

string defines the code

attachStyleDefinition: Attaches a style definition.

attachStyleDefinition($sName, $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()
inherited_from \cHTMLLink::attachStyleDefinition()

Parameters

$sName

string Name for a style definition

$sDefinition

string Definition for the given entity

Returns

stringfilled SGML closing skeleton

Constructor Function Initializes the SGML open/close tags

cHTML() 
Inherited
inherited_from \cHTML::cHTML()
inherited_from \cHTMLLink::cHTML()

disableAutomaticParameterAppend()

disableAutomaticParameterAppend() 
Inherited
inherited_from \cHTMLLink::disableAutomaticParameterAppend()

disableHistory: Disables the display of all note items

disableHistory() : \none
access public

Returns

\none

disableHistoryDelete: Disables the delete function in the history view

disableHistoryDelete() : \none
access public

Returns

\none

enableAutomaticParameterAppend()

enableAutomaticParameterAppend() 
Inherited
inherited_from \cHTMLLink::enableAutomaticParameterAppend()

enableHistory: Enables the display of all note items

enableHistory() : \none
access public

Returns

\none

enableHistoryDelete: Enables the delete function in the history view

enableHistoryDelete() : \none
access public

Returns

\none

fillCloseSkeleton: Fills the close skeleton

fillCloseSkeleton() : string
Inherited
inherited_from \cHTML::fillCloseSkeleton()
inherited_from \cHTMLLink::fillCloseSkeleton()

Returns

stringfilled SGML closer skeleton

fillSkeleton: Fills the open SGML tag skeleton

fillSkeleton($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()
inherited_from \cHTMLLink::fillSkeleton()

Parameters

$attributes

string Attributes to set

Returns

stringfilled SGML opener skeleton

getHref()

getHref() 
Inherited
inherited_from \cHTMLLink::getHref()

getID: returns the current ID

getID() : string
Inherited
inherited_from \cHTML::getID()
inherited_from \cHTMLLink::getID()

Returns

stringcurrent ID

render: Renders the resulting link

render($return) : \none
access public

Parameters

$return

Returns

\none

setAlt: sets the alt and title attributes

setAlt($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()
inherited_from \cHTMLLink::setAlt()

Parameters

$alt

string Text to set as the "alt" attribute

setAnchor: Sets an anchor

setAnchor($anchor) 
Inherited

Only works for the link types Link and cLink.

inherited_from \cHTMLLink::setAnchor()

Parameters

$anchor

setAttribte: Sets a specific attribute

setAttribute($sAttributeName, $sValue) 
Inherited
inherited_from \cHTML::setAttribute()
inherited_from \cHTMLLink::setAttribute()

Parameters

$sAttributeName

string Name of the attribute

$sValue

string Value of the attribute

sets the CSS class

setClass($class) 
Inherited
inherited_from \cHTML::setClass()
inherited_from \cHTMLLink::setClass()

Parameters

$class

string Text to set as the "alt" attribute

setContent: Sets the link's content

setContent($content) 
Inherited
inherited_from \cHTMLLink::setContent()

Parameters

$content

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

setContentlessTag()

setContentlessTag($contentlessTag) 
Inherited
inherited_from \cHTML::setContentlessTag()
inherited_from \cHTMLLink::setContentlessTag()

Parameters

$contentlessTag

setCustom: Sets a custom attribute to be appended to the link

setCustom($key, $value) 
Inherited
inherited_from \cHTMLLink::setCustom()

Parameters

$key

string Parameter name

$value

string Parameter value

adds an "onXXX" javascript event handler

setEvent($event, $action) 
Inherited

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

inherited_from \cHTML::setEvent()
inherited_from \cHTMLLink::setEvent()

Parameters

$event

string Type of the event

$action

string Function or action to call (JavaScript Code)

Setter for static $_generateXHTML property

setGenerateXHTML(bool $value) 
InheritedStatic
inherited_from \cHTML::setGenerateXHTML()
inherited_from \cHTMLLink::setGenerateXHTML()

Parameters

$value

bool

sets the ID class

setID($id) 
Inherited
inherited_from \cHTML::setID()
inherited_from \cHTMLLink::setID()

Parameters

$id

sets the CSS style

setStyle($style) 
Inherited
inherited_from \cHTML::setStyle()
inherited_from \cHTMLLink::setStyle()

Parameters

$style

addStyleDefinition

setStyleDefinition($entity, $definition) : string
Inherited
inherited_from \cHTML::setStyleDefinition()
inherited_from \cHTMLLink::setStyleDefinition()

Parameters

$entity

string Entity to define

$definition

string Definition for the given entity

Returns

stringfilled SGML closing skeleton

setTargetFrame: Sets the target frame

setTargetFrame($target) 
Inherited
inherited_from \cHTMLLink::setTargetFrame()

Parameters

$target

string Target frame identifier

Renders the link

toHTML() : string
Inherited
inherited_from \cHTMLLink::toHTML()

Returns

stringRendered HTML

removes an event handler

unsetEvent($event) 
Inherited

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

inherited_from \cHTML::unsetEvent()
inherited_from \cHTMLLink::unsetEvent()

Parameters

$event

string Type of the event

 Properties

 

$_aEventDefinitions 
Inherited
inherited_from \cHTML::$$_aEventDefinitions
inherited_from \cHTMLLink::$$_aEventDefinitions
 

$_aStyleDefinitions 
Inherited
inherited_from \cHTML::$$_aStyleDefinitions
inherited_from \cHTMLLink::$$_aStyleDefinitions
 

$_anchor 
Inherited
inherited_from \cHTMLLink::$$_anchor
 

If true, history items can be deleted

$_bDeleteHistoryItems : boolean
access private
 

If true, shows the note history

$_bShowHistory : boolean
access private
 

$_content 
Inherited
inherited_from \cHTMLLink::$$_content
 

$_contentlessTag : boolean
Inherited
access private
inherited_from \cHTML::$$_contentlessTag
inherited_from \cHTMLLink::$$_contentlessTag
 

$_custom 
Inherited
inherited_from \cHTMLLink::$$_custom
   

$_requiredScripts : array
Inherited
access private
inherited_from \cHTML::$$_requiredScripts
inherited_from \cHTMLLink::$$_requiredScripts
 

Object ID

$_sItemID : string
access private
 

Object type

$_sItemType : string
access private
 

$_skeleton_close : string
Inherited
access private
inherited_from \cHTML::$$_skeleton_close
inherited_from \cHTMLLink::$$_skeleton_close
 

$_skeleton_open : string
Inherited
access private
inherited_from \cHTML::$$_skeleton_open
inherited_from \cHTMLLink::$$_skeleton_open
 

$_skeleton_single : string
Inherited
access private
inherited_from \cHTML::$$_skeleton_single
inherited_from \cHTMLLink::$$_skeleton_single
 

$_styledefs : string
Inherited
access private
inherited_from \cHTML::$$_styledefs
inherited_from \cHTMLLink::$$_styledefs
 

$_tag : string
Inherited
access private
inherited_from \cHTML::$$_tag
inherited_from \cHTMLLink::$$_tag