Class \Prado\Web\UI\TTemplateControl
TTemplateControl is the base class for all controls that use templates. By default, a control template is assumed to be in a file under the same directory with the control class file. They have the same file name and different extension name. For template file, the extension name is ".tpl".
Class hierarchy
- \Prado\Web\UI\TTemplateControl
- \Prado\Web\UI\TCompositeControl implements INamingContainer
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
createChildControls() : mixed
Creates child controls.
This method is overridden to load and instantiate control template. This method should only be used by framework and control developers. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
injectContent(string $id, TContent $content) : mixed
Injects all content controls (and their children) to the corresponding content placeholders.
This method should only be used by framework and control developers. |
public
|
|
public
|
registerContentPlaceHolder(string $id, TContentPlaceHolder $object) : mixed
Registers a content placeholder to this template control.
This method should only be used by framework and control developers. |
public
|
|
public
|
setTemplate(ITemplate $value) : mixed
Sets the parsed template.
Note, the template will be applied to the whole control class. This method should only be used by framework and control developers. |
public
|
tryToUpdateAR(TActiveRecord $arObj[, bool $throwExceptions = false ]) : mixed
Function to try to update an AR object with data in view controls.
|
public
|
tryToUpdateView(TActiveRecord $arObj[, bool $throwExceptions = false ]) : mixed
Function to update view controls with data in a given AR object.
View controls and AR object need to have the same name in IDs and Attrs respectively. |
protected
|
initRecursive([TControl $namingContainer = null ]) : mixed
Performs the OnInit step for the control and all its child controls.
This method overrides the parent implementation by ensuring child controls are created first, and if master class is set, master will be applied. Only framework developers should use this method. |
protected
|
public
mixed
|
EXT_TEMPLATE
template file extension.
|
'.tpl'
|