Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | List of all members
eZTemplateNodeTool Class Reference
Template system

Various tool functions for working with template nodes. More...

## Static Public Member Functions
static | removeFunctionNodeChildren (&$node)
static | removeFunctionNodeParameters (&$node)
static | removeFunctionNodePlacement (&$node)
static | createVoidElement ()
static | createConstantElement ( $constant, $variablePlacement=false)
static | createStringElement ( $string, $variablePlacement=false)
static | createNumericElement ( $number, $variablePlacement=false)
static | createIdentifierElement ( $identifier, $variablePlacement=false)
static | createDynamicArrayElement (&$arrayKeys, &$arrayValues, $variablePlacement=false)
static | createArrayElement ( $array, $variablePlacement=false)
static | createBooleanElement ( $boolean, $variablePlacement=false)
static | createPHPVariableElement ( $variableName, $variablePlacement=false)
static | createVariableElement ( $variableName, $namespaceName, $namespaceScope=eZTemplate::NAMESPACE_SCOPE_LOCAL, $variablePlacement=false)
static | createAttributeLookupElement ( $attributeValues=array(), $variablePlacement=false)
static | createOperatorElement ( $name, $parameters=array(), $variablePlacement=false)
static | elementConstantValue ( $elements)
static | elementDynamicArrayKeys ( $elements)
static | elementDynamicArray ( $elements)
static | isConstantElement ( $elements)
static | isInternalCodePiece ( $elements)
static | isVariableElement ( $elements)
static | isPHPVariableElement ( $elements)
static | isNumericElement ( $elements)
static | isStringElement ( $elements)
static | isIdentifierElement ( $elements)
static | isBooleanElement ( $elements)
static | isDynamicArrayElement ( $elements)
static | isArrayElement ( $elements)
static | createFunctionNodeHook (&$node, $hookName, $hookParameters=array(), $hookFunction=false)
static | createVariableNode ( $originalNode=false, $variableData=false, $variablePlacement=false, $parameters=array(), $variableAssignmentName=false, $onlyExisting=false, $overWrite=true, $assignFromVariable=false, $rememberSet=false)
static | createCodePieceElement ( $codePiece, $values=false, $placement=false, $tmpValues=false, $knownTypes=true)
static | createTextNode ( $text)
static | createWarningNode ( $text, $label, $placement=false, $parameters=array())
static | createErrorNode ( $text, $label, $placement=false, $parameters=array())
static | createCodePieceNode ( $codePiece, $parameters=array())
static | createVariableUnsetNode ( $variableName, $parameters=array())
static | createWriteToOutputVariableNode ( $variableName, $parameters=array(), $assignmentType=eZPHPCreator::VARIABLE_APPEND_TEXT)
static | createAssignFromOutputVariableNode ( $variableName, $parameters=array(), $assignmentType=eZPHPCreator::VARIABLE_ASSIGNMENT)
static | createOutputVariableIncreaseNode ( $parameters=array())
static | createOutputVariableDecreaseNode ( $parameters=array())
static | createSpacingIncreaseNode ( $spacing=4, $parameters=array())
static | createSpacingDecreaseNode ( $spacing=4, $parameters=array())
static | createNamespaceChangeNode ( $variableData, $parameters=array())
static | createNamespaceRestoreNode ( $parameters=array())
static | createResourceAcquisitionNode ( $resourceName, $templateName, $fileName, $method, $extraParameters, $placement=false, $parameters=array(), $newRootNamespace=false, $resourceVariableName=false)
static | extractNodes ( $nodeList, $parameters=array())
static | extractFunctionNodePlacement (&$node)
static | extractFunctionNodeChildren (&$node)
static | extractFunctionNodeParameters (&$node)
static | extractFunctionNodeParameterNames (&$node)
static | extractVariableNodeData (&$node)
static | extractFunctionNodeName (&$node)
static | extractVariableNodePlacement (&$node)
static | extractOperatorNodeParameters (&$node)
static | deflateFunctionNode (&$node, $preHook, $postHook)

## Detailed Description

Various tool functions for working with template nodes.

Definition at line 18 of file eztemplatenodetool.php.

## Member Function Documentation

## ◆ createArrayElement()

static eZTemplateNodeTool::createArrayElement | ( |  | $array,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents an array and returns it.

Definition at line 123 of file eztemplatenodetool.php.

References eZTemplate\TYPE_ARRAY.

Referenced by eZTemplateArrayOperator\arrayTrans(), createConstantElement(), eZTemplateArrayOperator\mergeTrans(), and eZTemplateUnitOperator\operatorTransform().

## ◆ createAssignFromOutputVariableNode()

static eZTemplateNodeTool::createAssignFromOutputVariableNode | ( |  | $variableName,
|  |  | $parameters = `array()`,
|  |  | $assignmentType = `eZPHPCreator::VARIABLE_ASSIGNMENT`
| ) |  |
| static

Creates a new template node that will assign the content of the current output variable to the variable named $variableName.

The assignment type is by default variable assignment (=) and can be changed using $assignmentType.

Parameters

  $parameters | An array with optional parameters, can contain the followin: spacing - The number of spaces to added for each line this expression creates.

Definition at line 488 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_OUTPUT_READ.

Referenced by eZTemplateBlockFunction\templateNodeTransformation(), and eZTemplateCacheFunction\templateNodeTransformation().

## ◆ createAttributeLookupElement()

static eZTemplateNodeTool::createAttributeLookupElement | ( |  | $attributeValues = `array()`,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which does lookup on an attribute and returns it.

Parameters

  $attributeValues | Must be an array with elements that result in scalar value or string.

Definition at line 170 of file eztemplatenodetool.php.

References createNumericElement(), createStringElement(), and eZTemplate\TYPE_ATTRIBUTE.

Referenced by eZObjectForwarder\resourceAcquisitionTransformation(), and eZObjectForwarder\templateNodeTransformation().

## ◆ createBooleanElement()

static eZTemplateNodeTool::createBooleanElement | ( |  | $boolean,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents a boolean and returns it.

Definition at line 133 of file eztemplatenodetool.php.

References eZTemplate\TYPE_BOOLEAN.

Referenced by eZTemplateArrayOperator\arrayTrans(), eZTemplateArrayOperator\compareTrans(), createConstantElement(), eZTemplateLogicOperator\logicalComparisonTransformation(), eZTemplateLogicOperator\trueFalseTransformation(), and eZURLOperator\urlTransformation().

## ◆ createCodePieceElement()

static eZTemplateNodeTool::createCodePieceElement | ( |  | $codePiece,
|  |  | $values = `false`,
|  |  | $placement = `false`,
|  |  | $tmpValues = `false`,
|  |  | $knownTypes = `true`
| ) |  |
| static

Definition at line 437 of file eztemplatenodetool.php.

References eZTemplate\TYPE_INTERNAL_CODE_PIECE.

Referenced by eZTemplateArrayOperator\arrayTrans(), eZTemplateArithmeticOperator\basicTransformation(), eZTemplateArithmeticOperator\castTransformation(), eZTemplateLogicOperator\chooseTransformation(), eZTemplateArrayOperator\compareTrans(), eZTemplateTextOperator\concatTransformation(), eZTemplateControlOperator\condTransform(), eZTemplateLocaleOperator\currentDateTransformation(), eZTemplateStringOperator\customMapTransformation(), eZTemplateLocaleOperator\dateTimeTransformation(), eZTemplateArithmeticOperator\decIncTransformation(), eZTemplateArrayOperator\extractTrans(), eZTemplateExecuteOperator\fetchTransform(), eZTemplateLocaleOperator\getTimeTransformation(), eZTemplateDigestOperator\hashTransformation(), eZi18nOperator\i18nTrans(), eZTemplateTextOperator\indentTransformation(), eZURLOperator\iniTrans(), eZTemplateTypeOperator\isTransform(), eZTemplateLocaleOperator\l10nTransformation(), eZTemplateLogicOperator\logicalComparisonTransformation(), eZTemplateLocaleOperator\makeDateTimeTransformation(), eZTemplateArrayOperator\mergeTrans(), eZTemplateArithmeticOperator\minMaxTransformation(), eZTemplateArithmeticOperator\modTransformation(), eZTemplateLogicOperator\negateTransformation(), eZTemplateNl2BrOperator\nl2brTransformation(), eZTemplateUnitOperator\operatorTransform(), eZTemplateStringOperator\phpMapTransformation(), eZTemplatePHPOperator\phpOperatorTransformation(), eZKernelOperator\preferencesTransformation(), eZTemplateArithmeticOperator\randTransformation(), eZTemplateArithmeticOperator\roundTransformation(), eZURLOperator\urlTransformation(), and eZTemplateStringOperator\washTransformation().

## ◆ createCodePieceNode()

static eZTemplateNodeTool::createCodePieceNode | ( |  | $codePiece,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 457 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_CODE_PIECE.

Referenced by eZTemplateCompiledLoop\cleanup(), eZTemplateCompiledLoop\createSequenceVars(), eZTemplateCompiledLoop\initVars(), eZTemplateCompiledLoop\iterateSequence(), eZTemplateCompiledLoop\processChildren(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateCompiledLoop\setCurrentSequenceValue(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZTemplateSequenceFunction\templateNodeSequenceCreate(), eZTemplateSequenceFunction\templateNodeSequenceIterate(), eZObjectForwarder\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSequenceFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZTemplateDefFunction\templateNodeTransformation(), eZTemplateWhileFunction\templateNodeTransformation(), and eZTemplateDesignResource\templateNodeTransformation().

## ◆ createConstantElement()

static eZTemplateNodeTool::createConstantElement | ( |  | $constant,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents the static value and returns it, the type of the variable determines the type of the element.

Definition at line 61 of file eztemplatenodetool.php.

References createArrayElement(), createBooleanElement(), createNumericElement(), createStringElement(), and createVoidElement().

Referenced by eZTemplateTextOperator\concatTransformation(), eZTemplateStringOperator\customMapTransformation(), eZTemplateArrayOperator\extractTrans(), and eZTemplateLogicOperator\logicalComparisonTransformation().

## ◆ createDynamicArrayElement()

static eZTemplateNodeTool::createDynamicArrayElement | ( | & | $arrayKeys,
|  | & | $arrayValues,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents an array and returns it.

Parameters

  array | key list, static.
  array | values as php code.
  values. |

Definition at line 113 of file eztemplatenodetool.php.

References eZTemplate\TYPE_DYNAMIC_ARRAY.

Referenced by eZTemplateArrayOperator\arrayTrans().

## ◆ createErrorNode()

static eZTemplateNodeTool::createErrorNode | ( |  | $text,
|  |  | $label,
|  |  | $placement = `false`,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 452 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_ERROR.

Referenced by eZObjectForwarder\resourceAcquisitionTransformation().

## ◆ createFunctionNodeHook()

static eZTemplateNodeTool::createFunctionNodeHook | ( | & | $node,
|  |  | $hookName,
|  |  | $hookParameters = `array()`,
|  |  | $hookFunction = `false`
| ) |  |
| static

Creates a new function node hook with name $hookName and optional parameters $hookParameters and function data $hookFunction and returns it.

Definition at line 384 of file eztemplatenodetool.php.

Referenced by deflateFunctionNode().

## ◆ createIdentifierElement()

static eZTemplateNodeTool::createIdentifierElement | ( |  | $identifier,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents an identifier and returns it.

Definition at line 99 of file eztemplatenodetool.php.

References eZTemplate\TYPE_IDENTIFIER.

## ◆ createNamespaceChangeNode()

static eZTemplateNodeTool::createNamespaceChangeNode | ( |  | $variableData,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 513 of file eztemplatenodetool.php.

References createNumericElement(), createStringElement(), and eZTemplate\NODE_INTERNAL_NAMESPACE_CHANGE.

Referenced by eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), and eZTemplateSwitchFunction\templateNodeTransformation().

## ◆ createNamespaceRestoreNode()

static eZTemplateNodeTool::createNamespaceRestoreNode | ( |  | $parameters = `array()` | ) |
| static

Definition at line 522 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_NAMESPACE_RESTORE.

Referenced by eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), and eZTemplateSwitchFunction\templateNodeTransformation().

## ◆ createNumericElement()

static eZTemplateNodeTool::createNumericElement | ( |  | $number,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents a number (float or integer) and returns it.

Definition at line 89 of file eztemplatenodetool.php.

References eZTemplate\TYPE_NUMERIC.

Referenced by eZTemplateArrayOperator\arrayTrans(), eZTemplateArithmeticOperator\basicTransformation(), eZTemplateArithmeticOperator\castTransformation(), createAttributeLookupElement(), createConstantElement(), createNamespaceChangeNode(), eZTemplateArithmeticOperator\decIncTransformation(), eZTemplateArithmeticOperator\minMaxTransformation(), eZTemplateArithmeticOperator\modTransformation(), eZTemplateUnitOperator\operatorTransform(), eZTemplateArithmeticOperator\romanTransformation(), and eZTemplateArithmeticOperator\roundTransformation().

## ◆ createOperatorElement()

static eZTemplateNodeTool::createOperatorElement | ( |  | $name,
|  |  | $parameters = `array()`,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents an operator and returns it.

Parameters

  $name | The name of the operator to run.
  $parameters | An array with parameters, each parameter is an array of variable elements.

Definition at line 186 of file eztemplatenodetool.php.

References eZTemplate\TYPE_ATTRIBUTE.

## ◆ createOutputVariableDecreaseNode()

static eZTemplateNodeTool::createOutputVariableDecreaseNode | ( |  | $parameters = `array()` | ) |
| static

Definition at line 498 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_OUTPUT_DECREASE.

Referenced by eZTemplateBlockFunction\templateNodeTransformation(), and eZTemplateCacheFunction\templateNodeTransformation().

## ◆ createOutputVariableIncreaseNode()

static eZTemplateNodeTool::createOutputVariableIncreaseNode | ( |  | $parameters = `array()` | ) |
| static

Definition at line 493 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_OUTPUT_INCREASE.

Referenced by eZTemplateBlockFunction\templateNodeTransformation(), and eZTemplateCacheFunction\templateNodeTransformation().

## ◆ createPHPVariableElement()

static eZTemplateNodeTool::createPHPVariableElement | ( |  | $variableName,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents an array and returns it.

Definition at line 145 of file eztemplatenodetool.php.

References eZTemplate\TYPE_PHP_VARIABLE.

## ◆ createResourceAcquisitionNode()

static eZTemplateNodeTool::createResourceAcquisitionNode | ( |  | $resourceName,
|  |  | $templateName,
|  |  | $fileName,
|  |  | $method,
|  |  | $extraParameters,
|  |  | $placement = `false`,
|  |  | $parameters = `array()`,
|  |  | $newRootNamespace = `false`,
|  |  | $resourceVariableName = `false`
| ) |  |
| static

Definition at line 527 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_RESOURCE_ACQUISITION.

Referenced by eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateDesignResource\templateNodeTransformation(), and eZTemplateFileResource\templateNodeTransformation().

## ◆ createSpacingDecreaseNode()

static eZTemplateNodeTool::createSpacingDecreaseNode | ( |  | $spacing = `4`,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 508 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_SPACING_DECREASE.

Referenced by eZTemplateCompiledLoop\processChildren(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), and eZTemplateWhileFunction\templateNodeTransformation().

## ◆ createSpacingIncreaseNode()

static eZTemplateNodeTool::createSpacingIncreaseNode | ( |  | $spacing = `4`,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 503 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_OUTPUT_SPACING_INCREASE.

Referenced by eZTemplateCompiledLoop\processChildren(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), and eZTemplateWhileFunction\templateNodeTransformation().

## ◆ createStringElement()

static eZTemplateNodeTool::createStringElement | ( |  | $string,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents a string and returns it.

Definition at line 79 of file eztemplatenodetool.php.

References eZTemplate\TYPE_STRING.

Referenced by eZTemplateArrayOperator\arrayTrans(), createAttributeLookupElement(), createConstantElement(), createNamespaceChangeNode(), eZi18nOperator\i18nTrans(), eZURLOperator\iniTrans(), eZTemplateArrayOperator\mergeTrans(), eZTemplateUnitOperator\operatorTransform(), and eZURLOperator\urlTransformation().

## ◆ createTextNode()

static eZTemplateNodeTool::createTextNode | ( |  | $text | ) |
| static

Definition at line 442 of file eztemplatenodetool.php.

References eZTemplate\NODE_TEXT.

Referenced by eZTemplate\appendDebugNodes(), eZTemplateDelimitFunction\templateNodeTransformation(), and eZTemplateSectionFunction\templateNodeTransformation().

## ◆ createVariableElement()

static eZTemplateNodeTool::createVariableElement | ( |  | $variableName,
|  |  | $namespaceName,
|  |  | $namespaceScope = `eZTemplate::NAMESPACE_SCOPE_LOCAL`,
|  |  | $variablePlacement = `false`
| ) |  |
| static

Creates an element which represents an variable lookup and returns it.

Parameters

  $namespaceScope | Type of variable lookup, can be one of: eZTemplate::NAMESPACE_SCOPE_GLOBAL, Look for variables at the very top of the namespace tree eZTemplate::NAMESPACE_SCOPE_LOCAL, Look for variables at the top of the current file being processed eZTemplate::NAMESPACE_SCOPE_RELATIVE, Look for variables from the current namespace

Definition at line 159 of file eztemplatenodetool.php.

References eZTemplate\TYPE_VARIABLE.

Referenced by eZObjectForwarder\resourceAcquisitionTransformation(), eZObjectForwarder\templateNodeTransformation(), and eZTemplateBlockFunction\templateNodeTransformation().

## ◆ createVariableNode()

static eZTemplateNodeTool::createVariableNode | ( |  | $originalNode = `false`,
|  |  | $variableData = `false`,
|  |  | $variablePlacement = `false`,
|  |  | $parameters = `array()`,
|  |  | $variableAssignmentName = `false`,
|  |  | $onlyExisting = `false`,
|  |  | $overWrite = `true`,
|  |  | $assignFromVariable = `false`,
|  |  | $rememberSet = `false`
| ) |  |
| static

Creates a new variable node and returns it.

Definition at line 395 of file eztemplatenodetool.php.

References eZTemplate\NODE_VARIABLE, eZTemplate\TYPE_BOOLEAN, eZTemplate\TYPE_NUMERIC, eZTemplate\TYPE_PHP_VARIABLE, and eZTemplate\TYPE_STRING.

Referenced by eZTemplateCompiledLoop\createSequenceVars(), eZTemplateCompiledLoop\processChildren(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateCompiledLoop\setCurrentSequenceValue(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZTemplateSequenceFunction\templateNodeSequenceCreate(), eZObjectForwarder\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZTemplateDefFunction\templateNodeTransformation(), and eZTemplateWhileFunction\templateNodeTransformation().

## ◆ createVariableUnsetNode()

static eZTemplateNodeTool::createVariableUnsetNode | ( |  | $variableName,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 462 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_VARIABLE_UNSET.

Referenced by eZTemplateCompiledLoop\destroySequenceVars(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateSequenceFunction\templateNodeSequenceCreate(), eZObjectForwarder\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateDefFunction\templateNodeTransformation(), and eZTemplateWhileFunction\templateNodeTransformation().

## ◆ createVoidElement()

static eZTemplateNodeTool::createVoidElement | ( |  | ) |
| static

Creates an element which represents nothing (void).

Definition at line 51 of file eztemplatenodetool.php.

References eZTemplate\TYPE_VOID.

Referenced by createConstantElement().

## ◆ createWarningNode()

static eZTemplateNodeTool::createWarningNode | ( |  | $text,
|  |  | $label,
|  |  | $placement = `false`,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 447 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_WARNING.

## ◆ createWriteToOutputVariableNode()

static eZTemplateNodeTool::createWriteToOutputVariableNode | ( |  | $variableName,
|  |  | $parameters = `array()`,
|  |  | $assignmentType = `eZPHPCreator::VARIABLE_APPEND_TEXT`
| ) |  |
| static

Creates a new template node that will assign the content of the current output variable to the variable named $variableName.

The assignment type is by default text concat (.) and can be changed using $assignmentType.

Parameters

  $parameters | An array with optional parameters, can contain the followin: spacing - The number of spaces to added for each line this expression creates.

Definition at line 475 of file eztemplatenodetool.php.

References eZTemplate\NODE_INTERNAL_OUTPUT_ASSIGN.

Referenced by eZTemplateCacheFunction\templateNodeTransformation().

## ◆ deflateFunctionNode()

static eZTemplateNodeTool::deflateFunctionNode | ( | & | $node,
|  |  | $preHook,
|  |  | $postHook
| ) |  |
| static

Creates a pre and post hook for the function node $node with the children in between the nodes. This means that a nested function node will be deflated to a pre/children/post list.

Definition at line 734 of file eztemplatenodetool.php.

References createFunctionNodeHook(), extractFunctionNodeChildren(), removeFunctionNodeChildren(), and removeFunctionNodeParameters().

## ◆ elementConstantValue()

static eZTemplateNodeTool::elementConstantValue | ( |  | $elements | ) |
| static

Returns
  The value of the constant element or `null` if the element is not constant.

Note
  Make sure the element is checked with isConstantElement() before running this.
  Can also be used on PHP variable elements, it will then fetch the variable name.

Definition at line 197 of file eztemplatenodetool.php.

References isConstantElement(), and isPHPVariableElement().

Referenced by eZURLOperator\applyQuotes(), eZTemplateArrayOperator\arrayTrans(), eZTemplateArithmeticOperator\basicTransformation(), eZTemplateArithmeticOperator\castTransformation(), eZTemplateLogicOperator\chooseTransformation(), eZTemplateArrayOperator\compareTrans(), eZTemplateTextOperator\concatTransformation(), eZTemplateControlOperator\condTransform(), eZTemplateStringOperator\customMapTransformation(), eZTemplateLocaleOperator\dateTimeTransformation(), eZTemplateArithmeticOperator\decIncTransformation(), eZTemplateArrayOperator\extractTrans(), eZTemplateExecuteOperator\fetchTransform(), eZTemplateCompiler\generateVariableDataCode(), eZi18nOperator\i18nTrans(), eZTemplateTextOperator\indentTransformation(), eZURLOperator\iniTrans(), eZTemplateLocaleOperator\l10nTransformation(), eZTemplateLogicOperator\logicalComparisonTransformation(), eZTemplateArrayOperator\mergeTrans(), eZTemplateArithmeticOperator\minMaxTransformation(), eZTemplateArithmeticOperator\modTransformation(), eZTemplateUnitOperator\operatorTransform(), eZTemplateStringOperator\phpMapTransformation(), eZKernelOperator\preferencesTransformation(), eZTemplateCompiledLoop\processChildren(), eZTemplateArithmeticOperator\romanTransformation(), eZTemplateArithmeticOperator\roundTransformation(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZObjectForwarder\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSequenceFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZURLOperator\urlTransformation(), and eZTemplateStringOperator\washTransformation().

## ◆ elementDynamicArray()

static eZTemplateNodeTool::elementDynamicArray | ( |  | $elements | ) |
| static

Returns
  assosiative array of parameters in Dynamic Array

Definition at line 218 of file eztemplatenodetool.php.

References isDynamicArrayElement().

Referenced by eZTemplateExecuteOperator\fetchTransform().

## ◆ elementDynamicArrayKeys()

static eZTemplateNodeTool::elementDynamicArrayKeys | ( |  | $elements | ) |
| static

Returns
  the array keys of the Dynamic array

Definition at line 208 of file eztemplatenodetool.php.

References isDynamicArrayElement().

Referenced by eZTemplateExecuteOperator\fetchTransform().

## ◆ extractFunctionNodeChildren()

static eZTemplateNodeTool::extractFunctionNodeChildren | ( | & | $node | ) |
| static

Returns
  the children of the function node $node.

Definition at line 669 of file eztemplatenodetool.php.

Referenced by deflateFunctionNode(), eZTemplateCompiledLoop\processChildren(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), and eZTemplateSwitchFunction\templateNodeTransformation().

## ◆ extractFunctionNodeName()

static eZTemplateNodeTool::extractFunctionNodeName | ( | & | $node | ) |
| static

Returns
  the name of the function for the function node $node.

Definition at line 705 of file eztemplatenodetool.php.

Referenced by eZTemplateSectionFunction\templateNodeTransformation().

## ◆ extractFunctionNodeParameterNames()

static eZTemplateNodeTool::extractFunctionNodeParameterNames | ( | & | $node | ) |
| static

Returns
  the parameters of the function node $node.

Definition at line 687 of file eztemplatenodetool.php.

## ◆ extractFunctionNodeParameters()

static eZTemplateNodeTool::extractFunctionNodeParameters | ( | & | $node | ) |
| static

Returns
  the parameters of the function node $node.

Definition at line 678 of file eztemplatenodetool.php.

Referenced by eZTemplateCompiledLoop\processChildren(), eZObjectForwarder\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), and eZTemplateToolbarFunction\templateNodeTransformation().

## ◆ extractFunctionNodePlacement()

static eZTemplateNodeTool::extractFunctionNodePlacement | ( | & | $node | ) |
| static

Returns
  the placement info from the function node $node.

Definition at line 660 of file eztemplatenodetool.php.

Referenced by eZTemplateExecuteOperator\fetchTransform(), eZTemplateCompiledLoop\processChildren(), eZObjectForwarder\resourceAcquisitionTransformation(), eZTemplateSequenceFunction\templateNodeSequenceCreate(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateDoFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateForFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateDefFunction\templateNodeTransformation(), and eZTemplateWhileFunction\templateNodeTransformation().

## ◆ extractNodes()

static eZTemplateNodeTool::extractNodes | ( |  | $nodeList,
|  |  | $parameters = `array()`
| ) |  |
| static

Definition at line 543 of file eztemplatenodetool.php.

Referenced by eZTemplateCompiledLoop\processChildren(), and eZTemplateSectionFunction\templateNodeTransformation().

## ◆ extractOperatorNodeParameters()

static eZTemplateNodeTool::extractOperatorNodeParameters | ( | & | $node | ) |
| static

Returns
  the parameters for the operator node $node.

Definition at line 723 of file eztemplatenodetool.php.

## ◆ extractVariableNodeData()

static eZTemplateNodeTool::extractVariableNodeData | ( | & | $node | ) |
| static

Returns
  the variable data from the variable node $node.

Definition at line 696 of file eztemplatenodetool.php.

## ◆ extractVariableNodePlacement()

static eZTemplateNodeTool::extractVariableNodePlacement | ( | & | $node | ) |
| static

Returns
  the variable placement from the variable node $node.

Definition at line 714 of file eztemplatenodetool.php.

Referenced by eZTemplateLogicOperator\chooseTransformation().

## ◆ isArrayElement()

static eZTemplateNodeTool::isArrayElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be an array. It is considered constant if the following is true:
  - The start value is array
  - It has no operators
  - It has no attribute lookup

See also
  isConstantElement

Definition at line 374 of file eztemplatenodetool.php.

References eZTemplate\TYPE_ARRAY.

## ◆ isBooleanElement()

static eZTemplateNodeTool::isBooleanElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be a boolean. It is considered constant if the following is true:
  - The start value is boolean
  - It has no operators
  - It has no attribute lookup

See also
  isConstantElement

Note
  If you don't care about pure booleans use isConstantElement instead and just use the element value as boolean value.

Definition at line 352 of file eztemplatenodetool.php.

References eZTemplate\TYPE_BOOLEAN.

## ◆ isConstantElement()

static eZTemplateNodeTool::isConstantElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to have a constant value. It is considered constant if the following is true:
  - The start value is either numeric, text, identifier, array or boolean
  - It has no operators
  - It has no attribute lookup

Definition at line 233 of file eztemplatenodetool.php.

References eZTemplate\TYPE_ARRAY, eZTemplate\TYPE_BOOLEAN, eZTemplate\TYPE_IDENTIFIER, eZTemplate\TYPE_NUMERIC, eZTemplate\TYPE_STRING, and eZTemplate\TYPE_VOID.

Referenced by eZTemplateArrayOperator\arrayTrans(), eZTemplateArithmeticOperator\basicTransformation(), eZTemplateArithmeticOperator\castTransformation(), eZTemplateLogicOperator\chooseTransformation(), eZTemplateArrayOperator\compareTrans(), eZTemplateTextOperator\concatTransformation(), eZTemplateControlOperator\condTransform(), eZTemplateStringOperator\customMapTransformation(), eZTemplateLocaleOperator\dateTimeTransformation(), eZTemplateArithmeticOperator\decIncTransformation(), elementConstantValue(), eZTemplateArrayOperator\extractTrans(), eZTemplateExecuteOperator\fetchTransform(), eZTemplateCompiler\generateVariableDataCode(), eZi18nOperator\i18nTrans(), eZTemplateTextOperator\indentTransformation(), eZURLOperator\iniTrans(), eZTemplateLocaleOperator\l10nTransformation(), eZTemplateLogicOperator\logicalComparisonTransformation(), eZTemplateArrayOperator\mergeTrans(), eZTemplateArithmeticOperator\minMaxTransformation(), eZTemplateArithmeticOperator\modTransformation(), eZTemplateUnitOperator\operatorTransform(), eZTemplateStringOperator\phpMapTransformation(), eZKernelOperator\preferencesTransformation(), eZTemplateCompiledLoop\processChildren(), eZTemplateArithmeticOperator\romanTransformation(), eZTemplateArithmeticOperator\roundTransformation(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZObjectForwarder\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateIncludeFunction\templateNodeTransformation(), eZTemplateMenuFunction\templateNodeTransformation(), eZTemplateSectionFunction\templateNodeTransformation(), eZTemplateSequenceFunction\templateNodeTransformation(), eZTemplateSetFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), eZTemplateToolbarFunction\templateNodeTransformation(), eZURLOperator\urlTransformation(), and eZTemplateStringOperator\washTransformation().

## ◆ isDynamicArrayElement()

static eZTemplateNodeTool::isDynamicArrayElement | ( |  | $elements | ) |
| static

Check if element id Dynamic Array

Definition at line 361 of file eztemplatenodetool.php.

References eZTemplate\TYPE_DYNAMIC_ARRAY.

Referenced by elementDynamicArray(), elementDynamicArrayKeys(), and eZTemplateExecuteOperator\fetchTransform().

## ◆ isIdentifierElement()

static eZTemplateNodeTool::isIdentifierElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be an identifier. It is considered constant if the following is true:
  - The start value is identifier
  - It has no operators
  - It has no attribute lookup

See also
  isConstantElement

Note
  If you don't care about pure identifiers use isStringElement or isConstantElement instead.

Definition at line 337 of file eztemplatenodetool.php.

References eZTemplate\TYPE_IDENTIFIER.

## ◆ isInternalCodePiece()

static eZTemplateNodeTool::isInternalCodePiece | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be an internal code piece.

Definition at line 257 of file eztemplatenodetool.php.

References eZTemplate\TYPE_INTERNAL_CODE_PIECE.

Referenced by eZTemplateExecuteOperator\fetchTransform().

## ◆ isNumericElement()

static eZTemplateNodeTool::isNumericElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be numerical. It is considered constant if the following is true:
  - The start value is numeric (integer or float)
  - It has no operators
  - It has no attribute lookup

See also
  isConstantElement

Note
  If you don't care about pure integers or floats use isConstantElement instead and just use the element value as numerical value.

Definition at line 296 of file eztemplatenodetool.php.

References eZTemplate\TYPE_NUMERIC.

## ◆ isPHPVariableElement()

static eZTemplateNodeTool::isPHPVariableElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to have a PHP variable element. The following must be true.
  - The start value is PHP variable
  - It has no operators
  - It has no attribute lookup

Definition at line 277 of file eztemplatenodetool.php.

References eZTemplate\TYPE_PHP_VARIABLE.

Referenced by elementConstantValue().

## ◆ isStringElement()

static eZTemplateNodeTool::isStringElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be a string. It is considered constant if the following is true:
  - The start value is string or identifier
  - It has no operators
  - It has no attribute lookup

See also
  isConstantElement

Note
  If you don't care about pure strings use isConstantElement instead and just use the element value as string value.

Definition at line 311 of file eztemplatenodetool.php.

References eZTemplate\TYPE_IDENTIFIER, and eZTemplate\TYPE_STRING.

## ◆ isVariableElement()

static eZTemplateNodeTool::isVariableElement | ( |  | $elements | ) |
| static

Returns
  `true` if the element list $elements is considered to be a variable element.

Definition at line 265 of file eztemplatenodetool.php.

References eZTemplate\TYPE_VARIABLE.

Referenced by eZTemplateExecuteOperator\fetchTransform().

## ◆ removeFunctionNodeChildren()

static eZTemplateNodeTool::removeFunctionNodeChildren | ( | & | $node | ) |
| static

Removes the children from the function node $node.

Definition at line 24 of file eztemplatenodetool.php.

Referenced by deflateFunctionNode().

## ◆ removeFunctionNodeParameters()

static eZTemplateNodeTool::removeFunctionNodeParameters | ( | & | $node | ) |
| static

Removes the parameters from the function node $node.

Definition at line 33 of file eztemplatenodetool.php.

Referenced by deflateFunctionNode().

## ◆ removeFunctionNodePlacement()

static eZTemplateNodeTool::removeFunctionNodePlacement | ( | & | $node | ) |
| static

Removes the placement info from the function node $node.

Definition at line 42 of file eztemplatenodetool.php.

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

- eztemplatenodetool.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.