|
eZ Publish
[trunk]
|
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 37 of file eztemplatedeffunction.php.
Returns the attribute list which is 'delimiter', 'elseif' and 'else'. key: parameter name value: can have children
Definition at line 56 of file eztemplatedeffunction.php.
Returns an array of the function names, required for eZTemplate::registerFunctions.
Definition at line 45 of file eztemplatedeffunction.php.
Returns the array with hits for the template compiler.
Definition at line 65 of file eztemplatedeffunction.php.
Returns false, telling the template parser that the function cannot have children.
Definition at line 171 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::process | ( | $ | tpl, |
| &$ | textElements, | ||
| $ | functionName, | ||
| $ | functionChildren, | ||
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | rootNamespace, | ||
| $ | currentNamespace | ||
| ) |
Actually executes the function (in processed mode).
Definition at line 127 of file eztemplatedeffunction.php.
| eZTemplateDefFunction::templateNodeTransformation | ( | $ | functionName, |
| &$ | node, | ||
| $ | tpl, | ||
| &$ | parameters, | ||
| $ | privateData | ||
| ) |
Compiles the function into PHP code.
Definition at line 80 of file eztemplatedeffunction.php.
| const eZTemplateDefFunction::DEF_FUNCTION_NAME = 'def' |
Definition at line 39 of file eztemplatedeffunction.php.
Referenced by functionList(), functionTemplateHints(), and process().
| const eZTemplateDefFunction::UNDEF_FUNCTION_NAME = 'undef' |
Definition at line 40 of file eztemplatedeffunction.php.
Referenced by functionList(), functionTemplateHints(), and process().