|
eZ Publish
[4.2]
|
Conditional execution in templates. 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 | FUNCTION_NAME = 'if' |
Conditional execution in templates.
This class allows to execute on of two or more code pieces depending on a condition.
Syntax:
{if <condition>}
[{elseif <condition>}]
[{else}]
{/if}
Example:
{if eq( $var, true() )}
Hello world
{else}
No world here, move along.
{/if}
Definition at line 57 of file eztemplateiffunction.php.
| eZTemplateIfFunction::attributeList | ( | ) |
Returns the attribute list which is 'delimiter', 'elseif' and 'else'. key: parameter name value: can have children
Definition at line 76 of file eztemplateiffunction.php.
| & eZTemplateIfFunction::functionList | ( | ) |
Returns an array of the function names, required for eZTemplate::registerFunctions.
Definition at line 64 of file eztemplateiffunction.php.
| eZTemplateIfFunction::functionTemplateHints | ( | ) |
Returns the array with hits for the template compiler.
Definition at line 86 of file eztemplateiffunction.php.
| eZTemplateIfFunction::hasChildren | ( | ) |
Returns true, telling the template parser that the function can have children.
Definition at line 274 of file eztemplateiffunction.php.
| eZTemplateIfFunction::process | ( | $ | tpl, |
| &$ | textElements, | ||
| $ | functionName, | ||
| $ | functionChildren, | ||
| $ | functionParameters, | ||
| $ | functionPlacement, | ||
| $ | rootNamespace, | ||
| $ | currentNamespace | ||
| ) |
Actually executes the function and its children (in processed mode).
Definition at line 174 of file eztemplateiffunction.php.
| eZTemplateIfFunction::templateNodeTransformation | ( | $ | functionName, |
| &$ | node, | ||
| $ | tpl, | ||
| $ | parameters, | ||
| $ | privateData | ||
| ) |
Compiles the function and its children into PHP code.
Definition at line 97 of file eztemplateiffunction.php.
| const eZTemplateIfFunction::FUNCTION_NAME = 'if' |
Definition at line 59 of file eztemplateiffunction.php.
Referenced by functionList(), and functionTemplateHints().