PHP Класс 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()}.
Показать файл
Открыть проект
Открытые методы
Метод |
Описание |
|
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. |
|
Защищенные методы
Описание методов
getLocalizedTemplate()
защищенный Метод
Finds a localized template file.
getTemplateByClassName()
публичный Метод
Loads the template corresponding to the specified class name.
public getTemplateByClassName ( $className ) : Prado\Web\UI\ITemplate |
Результат |
Prado\Web\UI\ITemplate |
template for the class name, null if template doesn't exist. |
getTemplateByFileName()
публичный Метод
Loads the template from the specified file.
public getTemplateByFileName ( $fileName ) : Prado\Web\UI\ITemplate |
Результат |
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.