eZPublish  4.5
eZTemplateForeachFunction Class Reference

FOREACH loop. 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 = 'foreach'

Detailed Description



{foreach <array> as [$keyVar =>] $itemVar
[sequence <array> as $sequenceVar]
[offset <offset>]
[max <max>]


{foreach $objects as $object}
{foreach $object.nodes as $node sequence array(dark,light) as $class}
<td class=$class>

Member Function Documentation

eZTemplateForeachFunction::attributeList ( )

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

& eZTemplateForeachFunction::functionList ( )

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

eZTemplateForeachFunction::functionTemplateHints ( )

Returns the array with hits for the template compiler.

eZTemplateForeachFunction::hasChildren ( )

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

eZTemplateForeachFunction::process (   $tpl,

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

eZTemplateForeachFunction::templateNodeTransformation (   $functionName,

Compiles the function and its children into PHP code.

Member Data Documentation

const eZTemplateForeachFunction::FUNCTION_NAME = 'foreach'

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