|
eZ Publish
[4.2]
|
Allows to define/undefine template variables in any place. More...
Public Member Functions | |
| attributeList () | |
| & | functionList () |
| functionTemplateHints () | |
| hasChildren () | |
| process ($tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace) | |
| templateNodeTransformation ($functionName, &$node, $tpl, &$parameters, $privateData) | |
Public Attributes | |
| const | DEF_FUNCTION_NAME = 'def' |
| const | UNDEF_FUNCTION_NAME = 'undef' |
Allows to define/undefine template variables in any place.
This class allows to execute on of two or more code pieces depending on a condition.
Syntax:
{def $var1=<value1> [$var2=<value2> ...]}
Example:
{def $i=10 $j=20}
{def $s1='hello' $s2='world'}
...
{set $i=$i+1}
...
{undef $i}
{undef $s1 $s2}
{undef}
Definition at line 57 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::attributeList | ( | ) |
Returns the attribute list which is 'delimiter', 'elseif' and 'else'. key: parameter name value: can have children
Definition at line 76 of file eztemplatedeffunction.php.
| & eZTemplateDefFunction::functionList | ( | ) |
Returns an array of the function names, required for eZTemplate::registerFunctions.
Definition at line 65 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::functionTemplateHints | ( | ) |
Returns the array with hits for the template compiler.
Definition at line 85 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::hasChildren | ( | ) |
Returns false, telling the template parser that the function cannot have children.
Definition at line 191 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::process | ( | $ | tpl, |
| &$ | textElements, | ||
| $ | functionName, | ||
| $ | functionChildren, | ||
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | rootNamespace, | ||
| $ | currentNamespace | ||
| ) |
Actually executes the function (in processed mode).
Definition at line 147 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::templateNodeTransformation | ( | $ | functionName, |
| &$ | node, | ||
| $ | tpl, | ||
| &$ | parameters, | ||
| $ | privateData | ||
| ) |
Compiles the function into PHP code.
Definition at line 100 of file eztemplatedeffunction.php.
| const eZTemplateDefFunction::DEF_FUNCTION_NAME = 'def' |
Definition at line 59 of file eztemplatedeffunction.php.
Referenced by functionList(), functionTemplateHints(), and process().
| const eZTemplateDefFunction::UNDEF_FUNCTION_NAME = 'undef' |
Definition at line 60 of file eztemplatedeffunction.php.
Referenced by functionList(), functionTemplateHints(), and process().