|
Class THead
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 setTitle 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 getMetaTags
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 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.
-
TComponent
-
TApplicationComponent
-
TControl
implements
IRenderable,
IBindable
-
THead
Methods summary
public
|
#
onInit( TEventParameter $param )
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.
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.
Parameters
Overrides
|
public
|
#
addParsedObject( string|TComponent $object )
Processes an object that is created during parsing template. This method adds
TMetaTag components into the getMetaTags MetaTags collection of the head
control.
Processes an object that is created during parsing template. This method adds
TMetaTag components into the getMetaTags MetaTags collection of the head
control.
Parameters
- $object
string|TComponent text string or component parsed and instantiated in template
See
Overrides
|
public
string
|
#
getTitle( )
Returns
string the page title.
|
public
|
#
setTitle( string $value )
Sets the page title. This title will be rendered only if the TPage::getTitle Title property of the page is empty.
Sets the page title. This title will be rendered only if the TPage::getTitle Title property of the page is empty.
Parameters
- $value
string the page title.
|
public
string
|
#
getBaseUrl( )
Returns
string base URL of the page. This URL is rendered as the 'href' attribute of
<base> tag. Defaults to ''.
|
public
|
#
setBaseUrl( string $url )
Parameters
- $url
string base URL of the page. This URL is rendered as the 'href' attribute of
<base> tag.
|
public
string
|
#
getShortcutIcon( )
Returns
string the URL for the shortcut icon of the page. Defaults to ''.
|
public
|
#
setShortcutIcon( string $url )
Parameters
- $url
string the URL for the shortcut icon of the page.
|
public
TMetaTagCollection
|
|
public
|
#
render( THtmlWriter $writer )
Renders the head control.
Renders the head control.
Parameters
Overrides
|
Methods inherited from TControl
__construct(),
__get(),
addToPostDataLoader(),
addedControl(),
applyStyleSheetSkin(),
autoBindProperty(),
autoDataBindProperties(),
bindProperty(),
broadcastEvent(),
bubbleEvent(),
clearChildState(),
clearControlState(),
clearNamingContainer(),
clearViewState(),
convertUniqueIdToClientId(),
createChildControls(),
createControlCollection(),
dataBind(),
dataBindChildren(),
dataBindProperties(),
ensureChildControls(),
findControl(),
findControlsByID(),
findControlsByType(),
focus(),
getAdapter(),
getAllowChildControls(),
getAttribute(),
getAttributes(),
getChildControlsCreated(),
getClientID(),
getControlStage(),
getControlState(),
getControls(),
getCustomData(),
getEnableTheming(),
getEnableViewState(),
getEnabled(),
getHasAdapter(),
getHasAttributes(),
getHasChildInitialized(),
getHasControls(),
getHasInitialized(),
getHasLoaded(),
getHasLoadedPostData(),
getHasPreRendered(),
getID(),
getIsSkinApplied(),
getNamingContainer(),
getPage(),
getParent(),
getRegisteredObject(),
getSkinID(),
getSourceTemplateControl(),
getTemplateControl(),
getUniqueID(),
getViewState(),
getVisible(),
hasAttribute(),
initRecursive(),
isDescendentOf(),
isObjectRegistered(),
loadRecursive(),
loadState(),
loadStateRecursive(),
onDataBinding(),
onLoad(),
onPreRender(),
onUnload(),
preRenderRecursive(),
raiseBubbleEvent(),
registerObject(),
removeAttribute(),
removedControl(),
renderChildren(),
renderControl(),
saveState(),
saveStateRecursive(),
setAdapter(),
setAttribute(),
setChildControlsCreated(),
setControlStage(),
setControlState(),
setCustomData(),
setEnableTheming(),
setEnableViewState(),
setEnabled(),
setID(),
setPage(),
setSkinID(),
setTemplateControl(),
setViewState(),
setVisible(),
trackViewState(),
traverseChildControls(),
unbindProperty(),
unloadRecursive(),
unregisterObject()
|
Methods inherited from TComponent
__call(),
__destruct(),
__isset(),
__set(),
__sleep(),
__unset(),
__wakeup(),
asa(),
attachBehavior(),
attachBehaviors(),
attachClassBehavior(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
clearBehaviors(),
createdOnTemplate(),
detachBehavior(),
detachBehaviors(),
detachClassBehavior(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
evaluateStatements(),
fxAttachClassBehavior(),
fxDetachClassBehavior(),
getAutoGlobalListen(),
getBehaviorsEnabled(),
getClassHierarchy(),
getEventHandlers(),
getListeningToGlobalEvents(),
getSubProperty(),
hasEvent(),
hasEventHandler(),
hasProperty(),
isa(),
listen(),
raiseEvent(),
setSubProperty(),
unlisten()
|
Constants inherited from TControl
AUTOMATIC_ID_PREFIX,
CLIENT_ID_SEPARATOR,
CS_CHILD_INITIALIZED,
CS_CONSTRUCTED,
CS_INITIALIZED,
CS_LOADED,
CS_PRERENDERED,
CS_STATE_LOADED,
ID_FORMAT,
ID_SEPARATOR,
IS_CHILD_CREATED,
IS_CREATING_CHILD,
IS_DISABLE_THEMING,
IS_DISABLE_VIEWSTATE,
IS_ID_SET,
IS_SKIN_APPLIED,
IS_STYLESHEET_APPLIED,
RF_ADAPTER,
RF_AUTO_BINDINGS,
RF_CHILD_STATE,
RF_CONTROLS,
RF_CONTROLSTATE,
RF_DATA_BINDINGS,
RF_EVENTS,
RF_NAMED_CONTROLS,
RF_NAMED_CONTROLS_ID,
RF_NAMED_OBJECTS,
RF_SKIN_ID
|
|