eZPublish  4.5
eZTemplateAttributeOperator Class Reference

Display of variable attributes using operator "attribute". More...

Public Member Functions

 eZTemplateAttributeOperator ($name="attribute")
 modify ($tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters)
 namedParameterList ()
 operatorList ()
 operatorTemplateHints ()

Public Attributes

 The array of operators, used for registering operators. More...

Private Member Functions

 displayVariable (&$value, $as_html, $show_values, $max, $cur_level, &$txt)

Detailed Description

Display of variable attributes using operator "attribute".

This class allows for displaying template variable attributes. The display is recursive and the number of levels can be maximized.

The operator can take three parameters. The first is the maximum number of levels to recurse, if blank or omitted the maxium level is infinity. The second is the type of display, if set to "text" the output is as pure text otherwise as html. The third is whether to show variable values or not, default is to not show.

// Example template code
// Display attributes of $myvar
// Display 2 levels of $tree
// Display attributes and values of $item

Member Function Documentation

eZTemplateAttributeOperator::displayVariable ( $value,

Helper function for recursive display of attributes. $value is the current variable, $as_html is true if display as html, $max is the maximum number of levels, $cur_level the current level and $txt is the output text which the function adds to.

Referenced by modify().

eZTemplateAttributeOperator::eZTemplateAttributeOperator (   $name = "attribute")

Initializes the object with the name $name, default is "attribute".

eZTemplateAttributeOperator::modify (   $tpl,

Display the variable.

eZTemplateAttributeOperator::namedParameterList ( )
eZTemplateAttributeOperator::operatorList ( )

Returns the template operators.

eZTemplateAttributeOperator::operatorTemplateHints ( )

Member Data Documentation


The array of operators, used for registering operators.

Referenced by operatorList().

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