11<?php
2- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3-
42/**
53 * Base class for form elements
64 *
@@ -39,8 +37,8 @@ class HTML_QuickForm_element extends HTML_Common
3937{
4038 private $ layout ;
4139 private $ icon ;
42-
43- // {{{ properties
40+ private $ template ;
41+ private $ customFrozenTemplate = '' ;
4442
4543 /**
4644 * Label of the field
@@ -87,9 +85,9 @@ class HTML_QuickForm_element extends HTML_Common
8785 * @param string Name of the element
8886 * @param mixed Label(s) for the element
8987 * @param mixed Associative array of tag attributes or HTML attributes name="value" pairs
90- * @since 1.0
91- * @access public
92- * @return void
88+ * @since 1.0
89+ * @access public
90+ * @return void
9391 */
9492 public function __construct ($ elementName = null , $ elementLabel = null , $ attributes = null )
9593 {
@@ -98,8 +96,7 @@ public function __construct($elementName = null, $elementLabel = null, $attribut
9896 $ this ->setName ($ elementName );
9997 }
10098 if (isset ($ elementLabel )) {
101-
102- $ labelFor = "" ;
99+ $ labelFor = '' ;
103100 // Default Inputs generate this
104101 if (!empty ($ attributes ['id ' ])) {
105102 $ labelFor = $ attributes ['id ' ];
@@ -159,7 +156,7 @@ public function setIcon($icon)
159156 * @access public
160157 * @return float
161158 */
162- function apiVersion ()
159+ public function apiVersion ()
163160 {
164161 return 3.2 ;
165162 } // end func apiVersion
@@ -174,7 +171,7 @@ function apiVersion()
174171 * @access public
175172 * @return string
176173 */
177- function getType ()
174+ public function getType ()
178175 {
179176 return $ this ->_type ;
180177 } // end func getType
@@ -190,7 +187,7 @@ function getType()
190187 * @access public
191188 * @return void
192189 */
193- function setName ($ name )
190+ public function setName ($ name )
194191 {
195192 // interface method
196193 } //end func setName
@@ -205,7 +202,7 @@ function setName($name)
205202 * @access public
206203 * @return string
207204 */
208- function getName ()
205+ public function getName ()
209206 {
210207 // interface method
211208 } //end func getName
@@ -221,7 +218,7 @@ function getName()
221218 * @access public
222219 * @return void
223220 */
224- function setValue ($ value )
221+ public function setValue ($ value )
225222 {
226223 // interface
227224 } // end func setValue
@@ -236,7 +233,7 @@ function setValue($value)
236233 * @access public
237234 * @return mixed
238235 */
239- function getValue ()
236+ public function getValue ()
240237 {
241238 // interface
242239 return null ;
@@ -251,7 +248,7 @@ function getValue()
251248 * @access public
252249 * @return void
253250 */
254- function freeze ()
251+ public function freeze ()
255252 {
256253 $ this ->_flagFrozen = true ;
257254 } //end func freeze
@@ -266,7 +263,7 @@ function freeze()
266263 * @return void
267264 * @since 3.2.4
268265 */
269- function unfreeze ()
266+ public function unfreeze ()
270267 {
271268 $ this ->_flagFrozen = false ;
272269 }
@@ -294,9 +291,6 @@ public function getFrozenHtml()
294291 //
295292 } //end func getFrozenHtml
296293
297- // }}}
298- // {{{ _getPersistantData()
299-
300294 /**
301295 * Used by getFrozenHtml() to pass the element's value if _persistantFreeze is on
302296 *
@@ -552,4 +546,38 @@ function _prepareValue($value, $assoc)
552546 }
553547 }
554548 }
549+
550+ /**
551+ * @param mixed $template
552+ * @return HTML_QuickForm_element
553+ */
554+ public function setTemplate ($ template )
555+ {
556+ $ this ->template = $ template ;
557+
558+ return $ this ;
559+ }
560+
561+ /**
562+ * @return string
563+ */
564+ public function getCustomFrozenTemplate ()
565+ {
566+ return $ this ->customFrozenTemplate ;
567+ }
568+
569+ /**
570+ * @param string $customFrozenTemplate
571+ * @return HTML_QuickForm_element
572+ */
573+ public function setCustomFrozenTemplate ($ customFrozenTemplate )
574+ {
575+ $ this ->customFrozenTemplate = $ customFrozenTemplate ;
576+
577+ return $ this ;
578+ }
579+
580+
581+
582+
555583}
0 commit comments