## Class THead

Description

THead class

THead displays a head element on a page. It displays the content enclosed in its body and the page title set by the Title property. In addition, stylesheets and JavaScripts registered via TClientScriptManager::registerStyleSheet, TClientScriptManager::registerStyleSheetFile TClientScriptManager::registerHeadJavaScript, and TClientScriptManager::registerHeadJavaScriptFile will also be displayed in the head. THead also manages and displays meta tags through its MetaTags property. You can add a meta object to the collection in code dynamically, or add it in template using the following syntax,

     <com:THead>
       <com:TMetaTag HttpEquiv="Pragma" Content="no-cache" />
       <com:TMetaTag Name="keywords" Content="Prado" />
     </com:THead>

Note, TPage has a property TPage::getHead that refers to the THead control currently on the page. A page can have at most once THead control. Although not required, it is recommended to place a THead on your page. Without a THead on the page, stylesheets and javascripts in the current page theme will not be rendered.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Marcus Nyeholt <tanus@users.sourceforge.net> and Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/THead.php (line 44)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --THead

Method Summary
void addParsedObject (string|TComponent $object)
string getBaseUrl ()
TMetaTagCollection getMetaTags ()
string getTitle ()
void onInit (TEventParameter $param)
void render (THtmlWriter $writer)
void setBaseUrl (string $url)
void setTitle (string $value)
Methods
addParsedObject (line 72)

Processes an object that is created during parsing template.

This method adds TMetaTag components into the MetaTags collection of the head control.

- access: public
- see: TControl::createdOnTemplate()

void addParsedObject (string|TComponent $object)

- string|TComponent $object: text string or component parsed and instantiated in template

Redefinition of:

TControl::addParsedObject()
  Processes an object that is created during parsing template.

getBaseUrl (line 102)

- return: base URL of the page. This URL is rendered as the 'href' attribute of <base> tag. Defaults to ''.
- access: public

string getBaseUrl ()
getMetaTags (line 118)

- return: meta tag collection
- access: public

TMetaTagCollection getMetaTags ()
getTitle (line 83)

- return: the page title.
- access: public

string getTitle ()
onInit (line 59)

Registers the head control with the current page.

This method is invoked when the control enters 'Init' stage. The method raises 'Init' event. If you override this method, be sure to call the parent implementation so that the event handlers can be invoked.

- access: public

void onInit (TEventParameter $param)

- TEventParameter $param: event parameter to be passed to the event handlers

Redefinition of:

TControl::onInit()
  This method is invoked when the control enters 'OnInit' stage.

render (line 132)

Renders the head control.

- access: public

void render (THtmlWriter $writer)

- THtmlWriter $writer: the writer for rendering purpose.

Redefinition of:

TControl::render()
  Renders the control.

setBaseUrl (line 110)

- access: public

void setBaseUrl (string $url)

- string $url: base URL of the page. This URL is rendered as the 'href' attribute of <base> tag.

setTitle (line 94)

Sets the page title.

This title will be rendered only if the TPage::getTitle property of the page is empty.

- access: public

void setTitle (string $value)

- string $value: the page title.

#### Inherited Methods

Inherited From TControl

> TControl::__construct()
> TControl::addedControl()
> TControl::addParsedObject()
> TControl::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::broadcastEventInternal()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::createdOnTemplate()
> 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::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasControls()
> 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::onBubbleEvent()
> 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::setEnabled()
> TControl::setEnableTheming()
> TControl::setEnableViewState()
> TControl::setID()
> TControl::setPage()
> TControl::setSkinID()
> TControl::setTemplateControl()
> TControl::setViewState()
> TControl::setVisible()
> 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::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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

#### Inherited Constants

Inherited from TControl

Documentation generated on Mon, 01 May 2006 23:03:32 -0400 by phpDocumentor 1.3.0RC4