|
eZ Publish
[trunk]
|
Sets template variables code using function 'set'. More...
Public Member Functions | |
| cleanupVariables ($tpl, $rootNamespace, &$currentNamespace, $setData) | |
| createDefaultVariables ($tpl, $functionParameters, $functionPlacement, $name, $rootNamespace, &$currentNamespace) | |
| defineVariables ($tpl, $functionParameters, $functionPlacement, $name, $rootNamespace, &$currentNamespace) | |
| eZTemplateSetFunction ($setName= 'set', $letName= 'let', $defaultName= 'default') | |
| functionList () | |
| functionTemplateHints () | |
| hasChildren () | |
| process ($tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace) | |
| templateHookProcess ($functionName, $functionHookName, $functionHook, $tpl, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace) | |
| templateNodeTransformation ($functionName, &$node, $tpl, $parameters, $privateData) | |
Public Attributes | |
| $DefaultName | |
| $LetName | |
| $SetName | |
| The name of the set function. | |
| const | SCOPE_GLOBAL = 3 |
| const | SCOPE_RELATIVE = 1 |
| const | SCOPE_ROOT = 2 |
Sets template variables code using function 'set'.
Allows for setting template variables from templates using a template function. This is mainly used for optimizations.
The let function will define new variables and initialize them with a value while set only sets values to existing variables. The let function is also scoped with children which means that the variables are unset when the children are processed.
// Example template code {let object=$item1 some_text='abc' integer=1} {set object=$item2 some_text='def'} {/let} {set name=NewNamespace place='/etc/test.tpl'}
Definition at line 36 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::cleanupVariables | ( | $ | tpl, |
| $ | rootNamespace, | ||
| &$ | currentNamespace, | ||
| $ | setData | ||
| ) |
Definition at line 249 of file eztemplatesetfunction.php.
Referenced by process().
| eZTemplateSetFunction::createDefaultVariables | ( | $ | tpl, |
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | name, | ||
| $ | rootNamespace, | ||
| &$ | currentNamespace | ||
| ) |
Definition at line 221 of file eztemplatesetfunction.php.
Referenced by process().
| eZTemplateSetFunction::defineVariables | ( | $ | tpl, |
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | name, | ||
| $ | rootNamespace, | ||
| &$ | currentNamespace | ||
| ) |
Definition at line 186 of file eztemplatesetfunction.php.
Referenced by process().
| eZTemplateSetFunction::eZTemplateSetFunction | ( | $ | setName = 'set', |
| $ | letName = 'let', |
||
| $ | defaultName = 'default' |
||
| ) |
Initializes the function with the function names $setName and $letName.
Definition at line 45 of file eztemplatesetfunction.php.
Returns an array of the function names, required for eZTemplate::registerFunctions.
Definition at line 55 of file eztemplatesetfunction.php.
Definition at line 60 of file eztemplatesetfunction.php.
Returns false, telling the template parser that this is a single tag.
Definition at line 365 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::process | ( | $ | tpl, |
| &$ | textElements, | ||
| $ | functionName, | ||
| $ | functionChildren, | ||
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | rootNamespace, | ||
| $ | currentNamespace | ||
| ) |
Loads the file specified in the parameter 'uri' with namespace 'name'.
Definition at line 262 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::templateHookProcess | ( | $ | functionName, |
| $ | functionHookName, | ||
| $ | functionHook, | ||
| $ | tpl, | ||
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | rootNamespace, | ||
| $ | currentNamespace | ||
| ) |
Definition at line 181 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::templateNodeTransformation | ( | $ | functionName, |
| &$ | node, | ||
| $ | tpl, | ||
| $ | parameters, | ||
| $ | privateData | ||
| ) |
Definition at line 79 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::$DefaultName |
Definition at line 375 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::$LetName |
Definition at line 374 of file eztemplatesetfunction.php.
| eZTemplateSetFunction::$SetName |
The name of the set function.
Definition at line 373 of file eztemplatesetfunction.php.
| const eZTemplateSetFunction::SCOPE_GLOBAL = 3 |
Definition at line 40 of file eztemplatesetfunction.php.
Referenced by process().
| const eZTemplateSetFunction::SCOPE_RELATIVE = 1 |
Definition at line 38 of file eztemplatesetfunction.php.
Referenced by process().
| const eZTemplateSetFunction::SCOPE_ROOT = 2 |
Definition at line 39 of file eztemplatesetfunction.php.
Referenced by process().