eZTemplateSetFunction Class Reference
[Template functions]

Sets template variables code using function 'set'. More...

List of all members.


Public Methods

 eZTemplateSetFunction ($setName= 'set',$letName= 'let',$defaultName= 'default')
functionList ()
 process (&$tpl,&$textElements,$functionName,$functionChildren,$functionParameters,$functionPlacement,$rootNamespace,$currentNamespace)
 hasChildren ()

Public Attributes

 SetName
 The name of the set function.


Detailed Description

Sets template variables code using function 'set'.

Allows for setting template variables from templates using a template function. This is mainly used for optimizations.

The let function will define new variables and initialize them with a value while set only sets values to existing variables. The let function is also scoped with children which means that the variables are unset when the children are processed.

// Example template code
{let object=$item1 some_text='abc' integer=1}
  {set object=$item2 some_text='def'}

{/let}

{set name=NewNamespace place='/etc/test.tpl'}

Definition at line eztemplatesetfunction.php.


Constructor & Destructor Documentation

eZTemplateSetFunction::eZTemplateSetFunction   setName = 'set',
  letName = 'let',
  defaultName = 'default'
 

Initializes the function with the function names $setName and $letName.

Definition at line eztemplatesetfunction.php.

References SetName.


Member Function Documentation

& eZTemplateSetFunction::functionList  
 

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

Definition at line eztemplatesetfunction.php.

eZTemplateSetFunction::hasChildren  
 

Returns false, telling the template parser that this is a single tag.

Definition at line eztemplatesetfunction.php.

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

Loads the file specified in the parameter 'uri' with namespace 'name'.

Definition at line eztemplatesetfunction.php.

References SetName.


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

Exponential