PHP Class Prado\Web\UI\TTemplateManager
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 {@link 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 {@link getTemplateByFileName}.
By default, TTemplateManager is registered with {@link TPageService} as the
template manager module that can be accessed via {@link TPageService::getTemplateManager()}.
Afficher le fichier
Open project: pradosoft/prado
Méthodes publiques
Méthode |
Description |
|
getTemplateByClassName ( $className ) : Prado\Web\UI\ITemplate |
Loads the template corresponding to the specified class name. |
|
getTemplateByFileName ( $fileName ) : Prado\Web\UI\ITemplate |
Loads the template from the specified file. |
|
init ( $config ) |
Initializes the module. |
|
Méthodes protégées
Method Details
getLocalizedTemplate()
protected méthode
Finds a localized template file.
getTemplateByClassName()
public méthode
Loads the template corresponding to the specified class name.
public getTemplateByClassName ( $className ) : Prado\Web\UI\ITemplate |
Résultat |
Prado\Web\UI\ITemplate |
template for the class name, null if template doesn't exist. |
getTemplateByFileName()
public méthode
Loads the template from the specified file.
public getTemplateByFileName ( $fileName ) : Prado\Web\UI\ITemplate |
Résultat |
Prado\Web\UI\ITemplate |
template parsed from the specified file, null if the file doesn't exist. |
This method is required by IModule and is invoked by application.
It starts output buffer if it is enabled.