eZPublish  3.8
eZTemplateDelimitFunction Class Reference

Displays left and right delimiter in templates. More...

Public Member Functions

 eZTemplateDelimitFunction ()
 
 functionList ()
 
 functionTemplateHints ()
 
 hasChildren ()
 
 process (&$tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $nspace, $current_nspace)
 
 templateNodeTransformation ($functionName, &$node, &$tpl, $parameters, $privateData)
 

Public Attributes

 $LName
 The name of the left delimiter tag. More...
 
 $RName
 The name of the right delimiter tag. More...
 

Detailed Description

Displays left and right delimiter in templates.

This class iss a template function for outputting the left and right delimiters. Since the left and right delimiters are always parsed by the template engine it's not possible to output these characters. By registering an instance of this class as template functions you can get these characters with {ldelim} and {rdelim}.

The name of these functions can also be controlled by passing the names to the constructor.

Example:

$tpl->registerFunctions( new eZTemplateDelimitFunction() );
// or custom names
$tpl->registerFunctions( new eZTemplateDelimitFunction( "l", "r" ) );
// alternatively
$tpl->registerFunction( "ldelim", $obj );
$tpl->registerFunction( "rdelim", $obj );

Member Function Documentation

eZTemplateDelimitFunction::eZTemplateDelimitFunction ( )

Initializes the object with a name for the left and right delimiter. Default is ldelim for left and rdelim for right.

eZTemplateDelimitFunction::functionList ( )

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

eZTemplateDelimitFunction::functionTemplateHints ( )

Returns an array with hints for the template compiler.

eZTemplateDelimitFunction::hasChildren ( )

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

eZTemplateDelimitFunction::process ( $tpl,
$textElements,
  $functionName,
  $functionChildren,
  $functionParameters,
  $functionPlacement,
  $nspace,
  $current_nspace 
)

Outputs the left or right delimiter if the function names match.

eZTemplateDelimitFunction::templateNodeTransformation (   $functionName,
$node,
$tpl,
  $parameters,
  $privateData 
)

Member Data Documentation

eZTemplateDelimitFunction::$LName

The name of the left delimiter tag.

eZTemplateDelimitFunction::$RName

The name of the right delimiter tag.


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