Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZTemplateForFunction Class Reference
Template system » Template functions

FOR loop. More...

## Public Member Functions
| functionList ()
| attributeList ()
| functionTemplateHints ()
| templateNodeTransformation ( $functionName, &$node, $tpl, $parameters, $privateData)
| process ( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace)
| hasChildren ()

## Public Attributes
const | FUNCTION_NAME = 'for'

## Detailed Description

FOR loop.

Syntax:

{for <number> to <number> as $itemVar [sequence <array> as $seqVar]}
[{delimiter}...{/delimiter}]
[{break}]
[{continue}]
[{skip}]
{/for}

Examples:

{for 1 to 5 as $i}
i: {$i}<br/>
{/for}
{for 5 to 1 as $i}
i: {$i}<br/>
{/for}

Definition at line 38 of file eztemplateforfunction.php.

## Member Function Documentation

## ◆ attributeList()

eZTemplateForFunction::attributeList | ( |  | ) |

Returns the attribute list. key: parameter name value: can have children

Definition at line 56 of file eztemplateforfunction.php.

## ◆ functionList()

eZTemplateForFunction::functionList | ( |  | ) |

Returns an array of the function names, required for eZTemplate::registerFunctions.

Definition at line 45 of file eztemplateforfunction.php.

References FUNCTION_NAME.

## ◆ functionTemplateHints()

eZTemplateForFunction::functionTemplateHints | ( |  | ) |

Returns the array with hits for the template compiler.

Definition at line 68 of file eztemplateforfunction.php.

References FUNCTION_NAME.

## ◆ hasChildren()

eZTemplateForFunction::hasChildren | ( |  | ) |

Returns true, telling the template parser that the function can have children.

Definition at line 214 of file eztemplateforfunction.php.

## ◆ process()

eZTemplateForFunction::process | ( |  | $tpl,
|  | & | $textElements,
|  |  | $functionName,
|  |  | $functionChildren,
|  |  | $functionParameters,
|  |  | $functionPlacement,
|  |  | $rootNamespace,
|  |  | $currentNamespace
| ) |  |

Actually executes the function and its children (in processed mode).

Definition at line 146 of file eztemplateforfunction.php.

References FUNCTION_NAME.

## ◆ templateNodeTransformation()

eZTemplateForFunction::templateNodeTransformation | ( |  | $functionName,
|  | & | $node,
|  |  | $tpl,
|  |  | $parameters,
|  |  | $privateData
| ) |  |

Compiles the function and its children into PHP code.

Definition at line 79 of file eztemplateforfunction.php.

References eZTemplateNodeTool\createCodePieceNode(), eZTemplateNodeTool\createSpacingDecreaseNode(), eZTemplateNodeTool\createSpacingIncreaseNode(), eZTemplateNodeTool\createVariableNode(), eZTemplateNodeTool\createVariableUnsetNode(), eZTemplateNodeTool\extractFunctionNodePlacement(), and FUNCTION_NAME.

## Member Data Documentation

## ◆ FUNCTION_NAME

const eZTemplateForFunction::FUNCTION_NAME = 'for'

Definition at line 40 of file eztemplateforfunction.php.

Referenced by functionList(), functionTemplateHints(), process(), and templateNodeTransformation().

The documentation for this class was generated from the following file:

- eztemplateforfunction.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.