PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TTemplateManager

TTemplateManager class

TTemplateManager manages the loading and parsing of control templates.

There are two ways of loading a template, either by the associated template control class name, or the template file name. The former is via calling TTemplateManager::getTemplateByClassName(), which tries to locate the corresponding template file under the directory containing the class file. The name of the template file is the class name with the extension '.tpl'. To load a template from a template file path, call TTemplateManager::getTemplateByFileName().

By default, TTemplateManager is registered with TPageService as the template manager module that can be accessed via TPageService::getTemplateManager().

TComponent
Extended by TApplicationComponent
Extended by TModule implements IModule
Extended by TTemplateManager
Package: System\Web\UI
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 3.0
Located at Web/UI/TTemplateManager.php
Methods summary
public
# init( TXmlElement $config )

Initializes the module. This method is required by IModule and is invoked by application. It starts output buffer if it is enabled.

Initializes the module. This method is required by IModule and is invoked by application. It starts output buffer if it is enabled.

Parameters

$config
TXmlElement
module configuration

Overrides

TModule::init()
public ITemplate
# getTemplateByClassName( mixed $className )

Loads the template corresponding to the specified class name.

Loads the template corresponding to the specified class name.

Returns

ITemplate
template for the class name, null if template doesn't exist.
public ITemplate
# getTemplateByFileName( mixed $fileName )

Loads the template from the specified file.

Loads the template from the specified file.

Returns

ITemplate
template parsed from the specified file, null if the file doesn't exist.
protected string|null
# getLocalizedTemplate( string $filename )

Finds a localized template file.

Finds a localized template file.

Parameters

$filename
string
template file.

Returns

string|null
a localized template file if found, null otherwise.
Methods inherited from TModule
getID(), setID()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), 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 summary
string TEMPLATE_FILE_EXT '.tpl'
#

Template file extension

Template file extension

string TEMPLATE_CACHE_PREFIX 'prado:template:'
#

Prefix of the cache variable name for storing parsed templates

Prefix of the cache variable name for storing parsed templates

Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO