PHP Class Prado\Web\UI\WebControls\THead

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, 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 one 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
Inheritance: extends Prado\Web\UI\TControl
Mostra file Open project: pradosoft/prado

Public Methods

Method Description
addParsedObject ( $object ) Processes an object that is created during parsing template.
getBaseUrl ( ) : string
getMetaTags ( ) : TMetaTagCollection
getShortcutIcon ( ) : string
getTitle ( ) : string
onInit ( $param ) Registers the head control with the current page.
render ( $writer ) Renders the head control.
setBaseUrl ( $url )
setShortcutIcon ( $url )
setTitle ( $value ) Sets the page title.

Method Details

addParsedObject() public method

This method adds TMetaTag components into the {@link getMetaTags MetaTags} collection of the head control.
See also: createdOnTemplate
public addParsedObject ( $object )

getBaseUrl() public method

public getBaseUrl ( ) : string
return string base URL of the page. This URL is rendered as the 'href' attribute of tag. Defaults to ''.

getMetaTags() public method

public getMetaTags ( ) : TMetaTagCollection
return TMetaTagCollection meta tag collection

getShortcutIcon() public method

public getShortcutIcon ( ) : string
return string the URL for the shortcut icon of the page. Defaults to ''.

getTitle() public method

public getTitle ( ) : string
return string the page title.

onInit() public method

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

render() public method

Renders the head control.
public render ( $writer )

setBaseUrl() public method

public setBaseUrl ( $url )

setShortcutIcon() public method

public setShortcutIcon ( $url )

setTitle() public method

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