Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

eztemplatedelimitfunction.php
Go to the documentation of this file.
1 <?php
36 class eZTemplateDelimitFunction
37 {
42 public function __construct()
43 {
44 $this->LName = 'ldelim';
45 $this->RName = 'rdelim';
46 }
47
51 function functionList()
52 {
53 return array( $this->LName, $this->RName );
54 }
55
59 function functionTemplateHints()
60 {
61 return array(
62 $this->LName => array( 'parameters' => false, 'static' => false, 'tree-transformation' => true ),
63 $this->RName => array( 'parameters' => false, 'static' => false, 'tree-transformation' => true )
64 );
65 }
66
67 function templateNodeTransformation( $functionName, &$node,
68 $tpl, $parameters, $privateData )
69 {
70 $newNodes = array();
71
72 if ( $functionName == $this->LName )
73 {
74 $newNodes = array ( eZTemplateNodeTool::createTextNode( $tpl->leftDelimiter() ) );
75 }
76 else
77 {
78 $newNodes = array ( eZTemplateNodeTool::createTextNode( $tpl->rightDelimiter() ) );
79 }
80 return $newNodes;
81 }
82
86 function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $nspace, $current_nspace )
87 {
88 switch ( $functionName )
89 {
90 case $this->LName:
91 {
92 $textElements[] = $tpl->leftDelimiter();
93 } break;
94 case $this->RName:
95 {
96 $textElements[] = $tpl->rightDelimiter();
97 } break;
98 }
99 }
100
104 function hasChildren()
105 {
106 return false;
107 }
108
110 public $LName;
112 public $RName;
113 }
114
115 ?>
eZTemplateDelimitFunction
Displays left and right delimiter in templates.
Definition: eztemplatedelimitfunction.php:37
eZTemplateDelimitFunction\hasChildren
hasChildren()
Definition: eztemplatedelimitfunction.php:104
eZTemplateDelimitFunction\templateNodeTransformation
templateNodeTransformation( $functionName, &$node, $tpl, $parameters, $privateData)
Definition: eztemplatedelimitfunction.php:67
eZTemplateDelimitFunction\functionTemplateHints
functionTemplateHints()
Definition: eztemplatedelimitfunction.php:59
eZTemplateDelimitFunction\__construct
__construct()
Definition: eztemplatedelimitfunction.php:42
eZTemplateDelimitFunction\process
process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $nspace, $current_nspace)
Definition: eztemplatedelimitfunction.php:86
eZTemplateDelimitFunction\functionList
functionList()
Definition: eztemplatedelimitfunction.php:51
eZTemplateDelimitFunction\$LName
$LName
The name of the left delimiter tag.
Definition: eztemplatedelimitfunction.php:110
eZTemplateDelimitFunction\$RName
$RName
The name of the right delimiter tag.
Definition: eztemplatedelimitfunction.php:112
eZTemplateNodeTool\createTextNode
static createTextNode( $text)
Definition: eztemplatenodetool.php:442
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.