eZTemplateSectionFunction Class Reference
[Template functions]

Advanced block handling in templates using function "section". More...

List of all members.


Public Methods

 eZTemplateSectionFunction ($name="section")
 attributeList ()
 functionList ()
 process (&$tpl,&$textElements,$functionName,$functionChildren,$functionParameters,$functionPlacement,$rootNamespace,$currentNamespace)
 hasChildren ()

Private Attributes

 Name

Detailed Description

Advanced block handling in templates using function "section".

This class can be used in several different ways. It's primary use is for display an array of elements using the loop parameter. The array is iterated and the text of all the children are appended for each element. The current key and item is set in the namespace provided by the parameter name. If the paremeter sequence is supplied and it is an array it will be iterated and each element will be set in the variable sequence, when the end of the sequence is reached it is restarted.

// Example of template code
{* Loop 5 times *}
{section loop=5}
{$item}
{/section}

Add these: {section name=adsfsdf sequence=array(234,234,23,4,234) loop=.. max=2 offset=0 exclude} {section-exclude check=id using=array(1,2,5)} {section-exclude check=array(class,id) using=array(1,2,5)} {section-include check=class_id using=array(1,2,5)}

asdfasdf

{delimiter}asdfasdf{/delimiter} {/section}

{$module.features.list(5,array(2,5))}

{section loop=... max=10 offset=2} {/section}

Definition at line eztemplatesectionfunction.php.


Constructor & Destructor Documentation

eZTemplateSectionFunction::eZTemplateSectionFunction   name = "section"
 

Initializes the object with a name, the name is required for determining the name of the -else tag.

Definition at line eztemplatesectionfunction.php.

References Name.


Member Function Documentation

eZTemplateSectionFunction::attributeList  
 

Returns the attribute list which is delimiter and $name-else, where $name is the name of the function.

Definition at line eztemplatesectionfunction.php.

eZTemplateSectionFunction::functionList  
 

Returns an array containing the name of the section function, default is "section". The name is specified in the constructor.

Definition at line eztemplatesectionfunction.php.

eZTemplateSectionFunction::hasChildren  
 

Returns true.

Definition at line eztemplatesectionfunction.php.

eZTemplateSectionFunction::process &$    tpl,
&$    textElements,
  functionName,
  functionChildren,
  functionParameters,
  functionPlacement,
  rootNamespace,
  currentNamespace
 

Processes the function with all it's children.

Definition at line eztemplatesectionfunction.php.


Member Data Documentation

eZTemplateSectionFunction::Name [private]
 

Name of the function

Definition at line eztemplatesectionfunction.php.

Referenced by eZTemplateSectionFunction().


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

Exponential