PHP Класс 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.
С версии: 3.0
Наследование: extends Prado\Web\UI\TControl
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

addParsedObject() публичный Метод

This method adds TMetaTag components into the {@link getMetaTags MetaTags} collection of the head control.
См. также: createdOnTemplate
public addParsedObject ( $object )

getBaseUrl() публичный Метод

public getBaseUrl ( ) : string
Результат string base URL of the page. This URL is rendered as the 'href' attribute of tag. Defaults to ''.

getMetaTags() публичный Метод

public getMetaTags ( ) : TMetaTagCollection
Результат TMetaTagCollection meta tag collection

getShortcutIcon() публичный Метод

public getShortcutIcon ( ) : string
Результат string the URL for the shortcut icon of the page. Defaults to ''.

getTitle() публичный Метод

public getTitle ( ) : string
Результат string the page title.

onInit() публичный Метод

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() публичный Метод

Renders the head control.
public render ( $writer )

setBaseUrl() публичный Метод

public setBaseUrl ( $url )

setShortcutIcon() публичный Метод

public setShortcutIcon ( $url )

setTitle() публичный Метод

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