[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> THead.php (sommaire)

THead class file

Author: Marcus Nyeholt <tanus@users.sourceforge.net> and Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: THead.php 1491 2006-11-05 00:50:01Z xue $
Poids: 377 lignes (10 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 3 classes

THead:: (10 méthodes):
  onInit()
  addParsedObject()
  getTitle()
  setTitle()
  getBaseUrl()
  setBaseUrl()
  getShortcutIcon()
  setShortcutIcon()
  getMetaTags()
  render()

TMetaTag:: (11 méthodes):
  getID()
  setID()
  getHttpEquiv()
  setHttpEquiv()
  getName()
  setName()
  getContent()
  setContent()
  getScheme()
  setScheme()
  render()

TMetaTagCollection:: (3 méthodes):
  insertAt()
  findIndexByID()
  findMetaTagByID()


Classe: THead  - X-Ref

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
{@link setTitle Title} property. In addition, stylesheets and JavaScripts registered via
{@link TClientScriptManager::registerStyleSheet}, {@link TClientScriptManager::registerStyleSheetFile}
{@link TClientScriptManager::registerHeadJavaScript}, and
{@link TClientScriptManager::registerHeadJavaScriptFile} will also be displayed
in the head.
THead also manages and displays meta tags through its {@link getMetaTags MetaTags}
property. You can add a meta object to the collection in code dynamically,
or add it in template using the following syntax,
<code>
<com:THead>
<com:TMetaTag HttpEquiv="Pragma" Content="no-cache" />
<com:TMetaTag Name="keywords" Content="Prado" />
</com:THead>
</code>

Note, {@link TPage} has a property {@link TPage::getHead Head} 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.

onInit($param)   X-Ref
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.

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

addParsedObject($object)   X-Ref
Processes an object that is created during parsing template.
This method adds TMetaTag components into the {@link getMetaTags MetaTags}
collection of the head control.

param: string|TComponent text string or component parsed and instantiated in template

getTitle()   X-Ref

return: string the page title.

setTitle($value)   X-Ref
Sets the page title.
This title will be rendered only if the {@link TPage::getTitle Title} property
of the page is empty.

param: string the page title.

getBaseUrl()   X-Ref

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

setBaseUrl($url)   X-Ref

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

getShortcutIcon()   X-Ref

return: string the URL for the shortcut icon of the page. Defaults to ''.

setShortcutIcon($url)   X-Ref

param: string the URL for the shortcut icon of the page.

getMetaTags()   X-Ref

return: TMetaTagCollection meta tag collection

render($writer)   X-Ref
Renders the head control.

param: THtmlWriter the writer for rendering purpose.

Classe: TMetaTag  - X-Ref

TMetaTag class.

TMetaTag represents a meta tag appearing in a page head section.
You can set its {@link setID ID}, {@link setHttpEquiv HttpEquiv},
{@link setName Name}, {@link setContent Content}, {@link setScheme Scheme}
properties, which correspond to id, http-equiv, name, content, and scheme
attributes for a meta tag, respectively.

getID()   X-Ref

return: string id of the meta tag

setID($value)   X-Ref

param: string id of the meta tag

getHttpEquiv()   X-Ref

return: string http-equiv attribute of the meta tag

setHttpEquiv($value)   X-Ref

param: string http-equiv attribute of the meta tag

getName()   X-Ref

return: string name attribute of the meta tag

setName($value)   X-Ref

param: string name attribute of the meta tag

getContent()   X-Ref

return: string content attribute of the meta tag

setContent($value)   X-Ref

param: string content attribute of the meta tag

getScheme()   X-Ref

return: string scheme attribute of the meta tag

setScheme($value)   X-Ref

param: string scheme attribute of the meta tag

render($writer)   X-Ref
Renders the meta tag.

param: THtmlWriter writer for the rendering purpose

Classe: TMetaTagCollection  - X-Ref

TMetaTagCollection class

TMetaTagCollection represents a collection of meta tags
contained in a {@link THead} control.

insertAt($index,$item)   X-Ref
Inserts an item at the specified position.
This overrides the parent implementation by performing type
check on the item being added.

param: integer the speicified position.
param: mixed new item

findIndexByID($id)   X-Ref
Finds the lowest cardinal index of the meta tag whose id is the one being looked for.

param: string the ID of the meta tag to be looked for
return: integer the index of the meta tag found, -1 if not found.

findMetaTagByID($id)   X-Ref
Finds the item whose value is the one being looked for.

param: string the id of the meta tag to be looked for
return: TMetaTag the meta tag found, null if not found.



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7