Smarty_Internal_Runtime_TplFunction
TplFunction Runtime Methods callTemplateFunction
- Full name:
\Smarty_Internal_Runtime_TplFunction
Methods
callTemplateFunction
Call template function
public callTemplateFunction(\Smarty_Internal_Template $tpl, string $name, array $params, bool $nocache): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$tpl |
\Smarty_Internal_Template | template object |
$name |
string | template function name |
$params |
array | parameter array |
$nocache |
bool | true if called nocache |
Throws:
registerTplFunctions
Register template functions defined by template
public registerTplFunctions(\Smarty|\Smarty_Internal_Template|\Smarty_Internal_TemplateBase $obj, array $tplFunctions, bool $override = true): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$obj |
\Smarty|\Smarty_Internal_Template|\Smarty_Internal_TemplateBase | |
$tplFunctions |
array | source information array of template functions defined in template |
$override |
bool | if true replace existing functions with same name |
getTplFunction
Return source parameter array for single or all template functions
Parameters:
Parameter | Type | Description |
---|---|---|
$tpl |
\Smarty_Internal_Template | template object |
$name |
null|string | template function name |
addTplFuncToCache
Add template function to cache file for nocache calls
Parameters:
Parameter | Type | Description |
---|---|---|
$tpl |
\Smarty_Internal_Template | |
$_name |
string | template function name |
$_function |
string | PHP function name |
saveTemplateVariables
Save current template variables on stack
Parameters:
Parameter | Type | Description |
---|---|---|
$tpl |
\Smarty_Internal_Template | |
$name |
string | stack name |
restoreTemplateVariables
Restore saved variables into template objects
Parameters:
Parameter | Type | Description |
---|---|---|
$tpl |
\Smarty_Internal_Template | |
$name |
string | stack name |
Automatically generated on 2025-03-18