Class THyperLink

Description

Implements interfaces:

THyperLink class

THyperLink displays a hyperlink on a page. The hyperlink URL is specified via the NavigateUrl property, and link text is via the Text property. It is also possible to display an image by setting the ImageUrl property. In this case, Text is displayed as the alternate text of the image. The link target is specified via the Target property. If both ImageUrl and Text are empty, the content enclosed within the control tag will be rendered.

  • since: 3.0
  • version: $Id: THyperLink.php 2211 2007-09-07 13:34:10Z xue $
  • author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/THyperLink.php (line 30)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --THyperLink
Direct descendents
Class Description
TActiveHyperLink TActiveHyperLink class.
Method Summary
TImage createImage (string $imageUrl)
string getData ()
string getImageUrl ()
string getNavigateUrl ()
string getTagName ()
string getTarget ()
string getText ()
void renderContents (THtmlWriter $writer)
void setData (string $value)
void setImageUrl (string $value)
void setNavigateUrl (string $value)
void setTarget (string $value)
void setText (string $value)
Methods
addAttributesToRender (line 44)

Adds attributes related to a hyperlink element to renderer.

  • access: protected
void addAttributesToRender (THtmlWriter $writer)
  • THtmlWriter $writer: the writer used for the rendering purpose

Redefinition of:
TWebControl::addAttributesToRender()
Adds attribute name-value pairs to renderer.
createImage (line 83)

Gets the TImage for rendering the ImageUrl property. This is not for creating dynamic images.

  • return: image control for rendering.
  • access: protected
TImage createImage (string $imageUrl)
  • string $imageUrl: image url.
getData (line 153)

Returns the URL to link to when the THyperLink component is clicked.

This method is required by IDataRenderer. It is the same as getText().

string getData ()
getImageUrl (line 114)
  • return: the location of the image file for the THyperLink
  • access: public
string getImageUrl ()
getNavigateUrl (line 131)
  • return: the URL to link to when the THyperLink component is clicked.
  • access: public
string getNavigateUrl ()
getTagName (line 35)
  • return: tag name of the hyperlink
  • access: protected
string getTagName ()

Redefinition of:
TWebControl::getTagName()
Returns the tag name used for this control.
getTarget (line 174)
  • return: the target window or frame to display the Web page content linked to when the THyperLink component is clicked.
  • access: public
string getTarget ()
getText (line 97)
  • return: the text caption of the THyperLink
  • access: public
string getText ()
renderContents (line 60)

Renders the body content of the hyperlink.

  • access: public
void renderContents (THtmlWriter $writer)

Redefinition of:
TWebControl::renderContents()
Renders the body content enclosed between the control tag.
setData (line 166)

Sets the URL to link to when the THyperLink component is clicked.

This method is required by IDataRenderer. It is the same as setText().

void setData (string $value)
  • string $value: the text caption to be set
setImageUrl (line 123)

Sets the location of image file of the THyperLink.

  • access: public
void setImageUrl (string $value)
  • string $value: the image file location

Redefined in descendants as:
setNavigateUrl (line 140)

Sets the URL to link to when the THyperLink component is clicked.

  • access: public
void setNavigateUrl (string $value)
  • string $value: the URL

Redefined in descendants as:
setTarget (line 183)

Sets the target window or frame to display the Web page content linked to when the THyperLink component is clicked.

  • access: public
void setTarget (string $value)
  • string $value: the target window, valid values include '_blank', '_parent', '_self', '_top' and empty string.

Redefined in descendants as:
  • TActiveHyperLink::setTarget() : Sets the target window or frame to display the Web page content linked to when the THyperLink component is clicked.
setText (line 106)

Sets the text caption of the THyperLink.

  • access: public
void setText (string $value)
  • string $value: the text caption to be set

Redefined in descendants as:

Inherited Methods

Inherited From TWebControl

TWebControl::addAttributesToRender()
TWebControl::clearStyle()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getDisplay()
TWebControl::getFont()
TWebControl::getForeColor()
TWebControl::getHasStyle()
TWebControl::getHeight()
TWebControl::getStyle()
TWebControl::getTabIndex()
TWebControl::getTagName()
TWebControl::getToolTip()
TWebControl::getWidth()
TWebControl::render()
TWebControl::renderBeginTag()
TWebControl::renderContents()
TWebControl::renderEndTag()
TWebControl::setAccessKey()
TWebControl::setBackColor()
TWebControl::setBorderColor()
TWebControl::setBorderStyle()
TWebControl::setBorderWidth()
TWebControl::setCssClass()
TWebControl::setDisplay()
TWebControl::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()

Inherited From TControl

TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::convertUniqueIdToClientId()
TControl::createChildControls()
TControl::createControlCollection()
TControl::dataBind()
TControl::dataBindChildren()
TControl::dataBindProperties()
TControl::ensureChildControls()
TControl::findControl()
TControl::findControlsByID()
TControl::findControlsByType()
TControl::focus()
TControl::getAdapter()
TControl::getAllowChildControls()
TControl::getAttribute()
TControl::getAttributes()
TControl::getChildControlsCreated()
TControl::getClientID()
TControl::getControls()
TControl::getControlStage()
TControl::getControlState()
TControl::getCustomData()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasChildInitialized()
TControl::getHasControls()
TControl::getHasInitialized()
TControl::getHasLoaded()
TControl::getHasLoadedPostData()
TControl::getHasPreRendered()
TControl::getID()
TControl::getNamingContainer()
TControl::getPage()
TControl::getParent()
TControl::getRegisteredObject()
TControl::getSkinID()
TControl::getSourceTemplateControl()
TControl::getTemplateControl()
TControl::getUniqueID()
TControl::getViewState()
TControl::getVisible()
TControl::hasAttribute()
TControl::initRecursive()
TControl::isDescendentOf()
TControl::isObjectRegistered()
TControl::loadRecursive()
TControl::loadState()
TControl::loadStateRecursive()
TControl::onDataBinding()
TControl::onInit()
TControl::onLoad()
TControl::onPreRender()
TControl::onUnload()
TControl::preRenderRecursive()
TControl::raiseBubbleEvent()
TControl::registerObject()
TControl::removeAttribute()
TControl::removedControl()
TControl::render()
TControl::renderChildren()
TControl::renderControl()
TControl::saveState()
TControl::saveStateRecursive()
TControl::setAdapter()
TControl::setAttribute()
TControl::setChildControlsCreated()
TControl::setControlStage()
TControl::setControlState()
TControl::setCustomData()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::trackViewState()
TControl::traverseChildControls()
TControl::unbindProperty()
TControl::unloadRecursive()
TControl::unregisterObject()
TControl::__get()

Inherited From TApplicationComponent

TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()

Inherited From TComponent

TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Class Constants

Documentation generated on Sun, 30 Sep 2007 19:16:19 -0400 by phpDocumentor 1.3.0RC4