@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | class TReCaptchaValidator extends TBaseValidator |
32 | 32 | { |
33 | - protected $_isvalid = null; |
|
33 | + protected $_isvalid=null; |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * Gets the name of the javascript class responsible for performing validation for this control. |
@@ -49,18 +49,18 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function getCaptchaControl() |
51 | 51 | { |
52 | - $control = $this->getValidationTarget(); |
|
53 | - if (!$control) |
|
52 | + $control=$this->getValidationTarget(); |
|
53 | + if(!$control) |
|
54 | 54 | throw new Exception('No target control specified for TReCaptchaValidator'); |
55 | - if (!($control instanceof TReCaptcha)) |
|
55 | + if(!($control instanceof TReCaptcha)) |
|
56 | 56 | throw new Exception('TReCaptchaValidator only works with TReCaptcha controls'); |
57 | 57 | return $control; |
58 | 58 | } |
59 | 59 | |
60 | 60 | public function getClientScriptOptions() |
61 | 61 | { |
62 | - $options = parent::getClientScriptOptions(); |
|
63 | - $options['ResponseFieldName'] = $this->getCaptchaControl()->getResponseFieldName(); |
|
62 | + $options=parent::getClientScriptOptions(); |
|
63 | + $options['ResponseFieldName']=$this->getCaptchaControl()->getResponseFieldName(); |
|
64 | 64 | return $options; |
65 | 65 | } |
66 | 66 | |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | protected function evaluateIsValid() |
75 | 75 | { |
76 | 76 | // check validity only once (if trying to evaulate multiple times, all redundant checks would fail) |
77 | - if (is_null($this->_isvalid)) |
|
77 | + if(is_null($this->_isvalid)) |
|
78 | 78 | { |
79 | - $control = $this->getCaptchaControl(); |
|
80 | - $this->_isvalid = $control->validate(); |
|
79 | + $control=$this->getCaptchaControl(); |
|
80 | + $this->_isvalid=$control->validate(); |
|
81 | 81 | } |
82 | 82 | return ($this->_isvalid==true); |
83 | 83 | } |
@@ -86,23 +86,23 @@ discard block |
||
86 | 86 | { |
87 | 87 | parent::onPreRender($param); |
88 | 88 | |
89 | - $cs = $this->Page->getClientScript(); |
|
89 | + $cs=$this->Page->getClientScript(); |
|
90 | 90 | $cs->registerPradoScript('validator'); |
91 | 91 | |
92 | 92 | // communicate validation status to the client side |
93 | - $value = $this->_isvalid===false ? '0' : '1'; |
|
94 | - $cs->registerHiddenField($this->getClientID().'_1',$value); |
|
93 | + $value=$this->_isvalid===false ? '0' : '1'; |
|
94 | + $cs->registerHiddenField($this->getClientID().'_1', $value); |
|
95 | 95 | |
96 | 96 | // update validator display |
97 | - if ($control = $this->getValidationTarget()) |
|
97 | + if($control=$this->getValidationTarget()) |
|
98 | 98 | { |
99 | - $fn = 'captchaUpdateValidatorStatus_'.$this->getClientID(); |
|
99 | + $fn='captchaUpdateValidatorStatus_'.$this->getClientID(); |
|
100 | 100 | |
101 | 101 | // check if we need to request a new captcha too |
102 | - if ($this->Page->IsCallback) |
|
102 | + if($this->Page->IsCallback) |
|
103 | 103 | { |
104 | - if ($control->getVisible(true)) |
|
105 | - if (!is_null($this->_isvalid)) |
|
104 | + if($control->getVisible(true)) |
|
105 | + if(!is_null($this->_isvalid)) |
|
106 | 106 | { |
107 | 107 | // if the response has been tested and we reach the pre-render phase |
108 | 108 | // then we need to regenerate the token, because it won't test positive |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | - $cs->registerEndScript($this->getClientID().'::validate', implode(' ',array( |
|
115 | + $cs->registerEndScript($this->getClientID().'::validate', implode(' ', array( |
|
116 | 116 | // this function will be used to update the validator |
117 | 117 | 'function '.$fn.'(valid)', |
118 | 118 | '{', |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function getDataKeyField() |
136 | 136 | { |
137 | - return $this->getViewState('DataKeyField',''); |
|
137 | + return $this->getViewState('DataKeyField', ''); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function setDataKeyField($value) |
144 | 144 | { |
145 | - $this->setViewState('DataKeyField',$value,''); |
|
145 | + $this->setViewState('DataKeyField', $value, ''); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function getDataKeys() |
152 | 152 | { |
153 | - if(($dataKeys=$this->getViewState('DataKeys',null))===null) |
|
153 | + if(($dataKeys=$this->getViewState('DataKeys', null))===null) |
|
154 | 154 | { |
155 | 155 | $dataKeys=new TList; |
156 | - $this->setViewState('DataKeys',$dataKeys,null); |
|
156 | + $this->setViewState('DataKeys', $dataKeys, null); |
|
157 | 157 | } |
158 | 158 | return $dataKeys; |
159 | 159 | } |
@@ -169,9 +169,9 @@ discard block |
||
169 | 169 | * @return mixed data value at the specified field |
170 | 170 | * @throws TInvalidDataValueException if the data is invalid |
171 | 171 | */ |
172 | - protected function getDataFieldValue($data,$field) |
|
172 | + protected function getDataFieldValue($data, $field) |
|
173 | 173 | { |
174 | - return TDataFieldAccessor::getDataFieldValue($data,$field); |
|
174 | + return TDataFieldAccessor::getDataFieldValue($data, $field); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | public function onSelectedIndexChanged($param) |
184 | 184 | { |
185 | - $this->raiseEvent('OnSelectedIndexChanged',$this,$param); |
|
185 | + $this->raiseEvent('OnSelectedIndexChanged', $this, $param); |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getEnableClientScript() |
69 | 69 | { |
70 | - return $this->getViewState('EnableClientScript',true); |
|
70 | + return $this->getViewState('EnableClientScript', true); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function setEnableClientScript($value) |
77 | 77 | { |
78 | - $this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true); |
|
78 | + $this->setViewState('EnableClientScript', TPropertyValue::ensureBoolean($value), true); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $page=$this->getPage(); |
89 | 89 | $page->ensureRenderInForm($this); |
90 | 90 | |
91 | - $writer->addAttribute('id',$this->getClientID()); |
|
91 | + $writer->addAttribute('id', $this->getClientID()); |
|
92 | 92 | |
93 | 93 | // We call parent implementation here because some attributes |
94 | 94 | // may be overwritten in the following |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $this->renderClientControlScript($writer); |
101 | 101 | } |
102 | 102 | else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
103 | - $writer->addAttribute('disabled','disabled'); |
|
103 | + $writer->addAttribute('disabled', 'disabled'); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function renderClientControlScript($writer) |
111 | 111 | { |
112 | - $cs = $this->getPage()->getClientScript(); |
|
113 | - $cs->registerPostBackControl($this->getClientClassName(),$this->getPostBackOptions()); |
|
112 | + $cs=$this->getPage()->getClientScript(); |
|
113 | + $cs->registerPostBackControl($this->getClientClassName(), $this->getPostBackOptions()); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function setIsDefaultButton($value) |
120 | 120 | { |
121 | - $this->setViewState('IsDefaultButton', TPropertyValue::ensureBoolean($value),false); |
|
121 | + $this->setViewState('IsDefaultButton', TPropertyValue::ensureBoolean($value), false); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | protected function renderLinkButtonHref($writer) |
137 | 137 | { |
138 | 138 | //create unique no-op url references |
139 | - $nop = "javascript:;//".$this->getClientID(); |
|
139 | + $nop="javascript:;//".$this->getClientID(); |
|
140 | 140 | $writer->addAttribute('href', $nop); |
141 | 141 | } |
142 | 142 | |
@@ -157,11 +157,11 @@ discard block |
||
157 | 157 | */ |
158 | 158 | protected function getPostBackOptions() |
159 | 159 | { |
160 | - $options['ID'] = $this->getClientID(); |
|
161 | - $options['EventTarget'] = $this->getUniqueID(); |
|
162 | - $options['CausesValidation'] = $this->getCausesValidation(); |
|
163 | - $options['ValidationGroup'] = $this->getValidationGroup(); |
|
164 | - $options['StopEvent'] = true; |
|
160 | + $options['ID']=$this->getClientID(); |
|
161 | + $options['EventTarget']=$this->getUniqueID(); |
|
162 | + $options['CausesValidation']=$this->getCausesValidation(); |
|
163 | + $options['ValidationGroup']=$this->getValidationGroup(); |
|
164 | + $options['StopEvent']=true; |
|
165 | 165 | |
166 | 166 | return $options; |
167 | 167 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function getText() |
187 | 187 | { |
188 | - return $this->getViewState('Text',''); |
|
188 | + return $this->getViewState('Text', ''); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | public function setText($value) |
195 | 195 | { |
196 | - $this->setViewState('Text',$value,''); |
|
196 | + $this->setViewState('Text', $value, ''); |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | */ |
228 | 228 | public function getCommandName() |
229 | 229 | { |
230 | - return $this->getViewState('CommandName',''); |
|
230 | + return $this->getViewState('CommandName', ''); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | */ |
236 | 236 | public function setCommandName($value) |
237 | 237 | { |
238 | - $this->setViewState('CommandName',$value,''); |
|
238 | + $this->setViewState('CommandName', $value, ''); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | */ |
244 | 244 | public function getCommandParameter() |
245 | 245 | { |
246 | - return $this->getViewState('CommandParameter',''); |
|
246 | + return $this->getViewState('CommandParameter', ''); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | */ |
252 | 252 | public function setCommandParameter($value) |
253 | 253 | { |
254 | - $this->setViewState('CommandParameter',$value,''); |
|
254 | + $this->setViewState('CommandParameter', $value, ''); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | public function getCausesValidation() |
261 | 261 | { |
262 | - return $this->getViewState('CausesValidation',true); |
|
262 | + return $this->getViewState('CausesValidation', true); |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function setCausesValidation($value) |
270 | 270 | { |
271 | - $this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true); |
|
271 | + $this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | */ |
277 | 277 | public function getValidationGroup() |
278 | 278 | { |
279 | - return $this->getViewState('ValidationGroup',''); |
|
279 | + return $this->getViewState('ValidationGroup', ''); |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | */ |
285 | 285 | public function setValidationGroup($value) |
286 | 286 | { |
287 | - $this->setViewState('ValidationGroup',$value,''); |
|
287 | + $this->setViewState('ValidationGroup', $value, ''); |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | /** |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | if($this->getCausesValidation()) |
302 | 302 | $this->getPage()->validate($this->getValidationGroup()); |
303 | 303 | $this->onClick(null); |
304 | - $this->onCommand(new TCommandEventParameter($this->getCommandName(),$this->getCommandParameter())); |
|
304 | + $this->onCommand(new TCommandEventParameter($this->getCommandName(), $this->getCommandParameter())); |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | /** |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | */ |
314 | 314 | public function onClick($param) |
315 | 315 | { |
316 | - $this->raiseEvent('OnClick',$this,$param); |
|
316 | + $this->raiseEvent('OnClick', $this, $param); |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | /** |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public function onCommand($param) |
327 | 327 | { |
328 | - $this->raiseEvent('OnCommand',$this,$param); |
|
329 | - $this->raiseBubbleEvent($this,$param); |
|
328 | + $this->raiseEvent('OnCommand', $this, $param); |
|
329 | + $this->raiseBubbleEvent($this, $param); |
|
330 | 330 | } |
331 | 331 | } |
332 | 332 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | class TJavascriptLogger extends TWebControl |
32 | 32 | { |
33 | - private static $_keyCodes = array( |
|
33 | + private static $_keyCodes=array( |
|
34 | 34 | '0'=>48, '1'=>49, '2'=>50, '3'=>51, '4'=>52, '5'=>53, '6'=>54, '7'=>55, '8'=>56, '9'=>57, |
35 | 35 | 'a'=>65, 'b'=>66, 'c'=>67, 'd'=>68, 'e'=>69, 'f'=>70, 'g'=>71, 'h'=>72, |
36 | 36 | 'i'=>73, 'j'=>74, 'k'=>75, 'l'=>76, 'm'=>77, 'n'=>78, 'o'=>79, 'p'=>80, |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function onPreRender($param) |
68 | 68 | { |
69 | - $key = strtolower($this->getToggleKey()); |
|
70 | - $code = isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74; |
|
71 | - $js = "var logConsole; jQuery(function() { logConsole = new LogConsole($code)}); "; |
|
72 | - $cs = $this->getPage()->getClientScript(); |
|
73 | - $cs->registerBeginScript($this->getClientID(),$js); |
|
69 | + $key=strtolower($this->getToggleKey()); |
|
70 | + $code=isset(self::$_keyCodes[$key]) ? self::$_keyCodes[$key] : 74; |
|
71 | + $js="var logConsole; jQuery(function() { logConsole = new LogConsole($code)}); "; |
|
72 | + $cs=$this->getPage()->getClientScript(); |
|
73 | + $cs->registerBeginScript($this->getClientID(), $js); |
|
74 | 74 | $cs->registerPradoScript('logger'); |
75 | 75 | } |
76 | 76 | |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function renderContents($writer) |
83 | 83 | { |
84 | - $code = strtoupper($this->getToggleKey()); |
|
85 | - $info = '(<a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/" target="_blank">more info</a>).'; |
|
86 | - $link = '<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>'; |
|
87 | - $usage = 'Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to'; |
|
84 | + $code=strtoupper($this->getToggleKey()); |
|
85 | + $info='(<a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/" target="_blank">more info</a>).'; |
|
86 | + $link='<a href="javascript:if(logConsole)logConsole.toggle()">toggle the javascript log console.</a>'; |
|
87 | + $usage='Press ALT-'.$code.' (Or CTRL-'.$code.' on OS X) to'; |
|
88 | 88 | $writer->write("{$usage} {$link} {$info}"); |
89 | 89 | } |
90 | 90 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function getDataField() |
49 | 49 | { |
50 | - return $this->getViewState('DataField',''); |
|
50 | + return $this->getViewState('DataField', ''); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function setDataField($value) |
57 | 57 | { |
58 | - $this->setViewState('DataField',$value,''); |
|
58 | + $this->setViewState('DataField', $value, ''); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getReadOnly() |
65 | 65 | { |
66 | - return $this->getViewState('ReadOnly',false); |
|
66 | + return $this->getViewState('ReadOnly', false); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function setReadOnly($value) |
73 | 73 | { |
74 | - $this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false); |
|
74 | + $this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @param integer the index to the Columns property that the cell resides in. |
85 | 85 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
86 | 86 | */ |
87 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
87 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
88 | 88 | { |
89 | 89 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) |
90 | 90 | { |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | $checkBox->setEnabled(false); |
94 | 94 | $cell->setHorizontalAlign('Center'); |
95 | 95 | $cell->getControls()->add($checkBox); |
96 | - $cell->registerObject('CheckBox',$checkBox); |
|
96 | + $cell->registerObject('CheckBox', $checkBox); |
|
97 | 97 | if($this->getDataField()!=='') |
98 | - $checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
98 | + $checkBox->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
99 | 99 | } |
100 | 100 | else |
101 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
101 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | * This method is invoked when datagrid performs databinding. |
107 | 107 | * It populates the content of the cell with the relevant data from data source. |
108 | 108 | */ |
109 | - public function dataBindColumn($sender,$param) |
|
109 | + public function dataBindColumn($sender, $param) |
|
110 | 110 | { |
111 | 111 | $item=$sender->getNamingContainer(); |
112 | 112 | $data=$item->getData(); |
113 | 113 | if(($field=$this->getDataField())!=='') |
114 | - $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data,$field)); |
|
114 | + $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data, $field)); |
|
115 | 115 | else |
116 | 116 | $value=TPropertyValue::ensureBoolean($data); |
117 | 117 | if($sender instanceof TCheckBox) |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | */ |
211 | 211 | public function setActiveStep($step) |
212 | 212 | { |
213 | - if(($index=$this->getWizardSteps()->indexOf($step))<0) |
|
213 | + if(($index=$this->getWizardSteps()->indexOf($step)) < 0) |
|
214 | 214 | throw new TInvalidOperationException('wizard_step_invalid'); |
215 | 215 | $this->setActiveStepIndex($index); |
216 | 216 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | public function getShowCancelButton() |
259 | 259 | { |
260 | - return $this->getViewState('ShowCancelButton',false); |
|
260 | + return $this->getViewState('ShowCancelButton', false); |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | */ |
266 | 266 | public function setShowCancelButton($value) |
267 | 267 | { |
268 | - $this->setViewState('ShowCancelButton',TPropertyValue::ensureBoolean($value),false); |
|
268 | + $this->setViewState('ShowCancelButton', TPropertyValue::ensureBoolean($value), false); |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | /** |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | */ |
274 | 274 | public function getShowSideBar() |
275 | 275 | { |
276 | - return $this->getViewState('ShowSideBar',true); |
|
276 | + return $this->getViewState('ShowSideBar', true); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | /** |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | */ |
282 | 282 | public function setShowSideBar($value) |
283 | 283 | { |
284 | - $this->setViewState('ShowSideBar',TPropertyValue::ensureBoolean($value),true); |
|
284 | + $this->setViewState('ShowSideBar', TPropertyValue::ensureBoolean($value), true); |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | /** |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | */ |
375 | 375 | public function getHeaderText() |
376 | 376 | { |
377 | - return $this->getViewState('HeaderText',''); |
|
377 | + return $this->getViewState('HeaderText', ''); |
|
378 | 378 | } |
379 | 379 | |
380 | 380 | /** |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | */ |
383 | 383 | public function setHeaderText($value) |
384 | 384 | { |
385 | - $this->setViewState('HeaderText',TPropertyValue::ensureString($value),''); |
|
385 | + $this->setViewState('HeaderText', TPropertyValue::ensureString($value), ''); |
|
386 | 386 | } |
387 | 387 | |
388 | 388 | /** |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | */ |
392 | 392 | public function getCancelDestinationUrl() |
393 | 393 | { |
394 | - return $this->getViewState('CancelDestinationUrl',''); |
|
394 | + return $this->getViewState('CancelDestinationUrl', ''); |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | /** |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | */ |
401 | 401 | public function setCancelDestinationUrl($value) |
402 | 402 | { |
403 | - $this->setViewState('CancelDestinationUrl',TPropertyValue::ensureString($value),''); |
|
403 | + $this->setViewState('CancelDestinationUrl', TPropertyValue::ensureString($value), ''); |
|
404 | 404 | } |
405 | 405 | |
406 | 406 | /** |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | */ |
410 | 410 | public function getFinishDestinationUrl() |
411 | 411 | { |
412 | - return $this->getViewState('FinishDestinationUrl',''); |
|
412 | + return $this->getViewState('FinishDestinationUrl', ''); |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | /** |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | */ |
418 | 418 | public function setFinishDestinationUrl($value) |
419 | 419 | { |
420 | - $this->setViewState('FinishDestinationUrl',TPropertyValue::ensureString($value),''); |
|
420 | + $this->setViewState('FinishDestinationUrl', TPropertyValue::ensureString($value), ''); |
|
421 | 421 | } |
422 | 422 | |
423 | 423 | /** |
@@ -425,10 +425,10 @@ discard block |
||
425 | 425 | */ |
426 | 426 | public function getSideBarButtonStyle() |
427 | 427 | { |
428 | - if(($style=$this->getViewState('SideBarButtonStyle',null))===null) |
|
428 | + if(($style=$this->getViewState('SideBarButtonStyle', null))===null) |
|
429 | 429 | { |
430 | 430 | $style=new TStyle; |
431 | - $this->setViewState('SideBarButtonStyle',$style,null); |
|
431 | + $this->setViewState('SideBarButtonStyle', $style, null); |
|
432 | 432 | } |
433 | 433 | return $style; |
434 | 434 | } |
@@ -438,10 +438,10 @@ discard block |
||
438 | 438 | */ |
439 | 439 | public function getNavigationButtonStyle() |
440 | 440 | { |
441 | - if(($style=$this->getViewState('NavigationButtonStyle',null))===null) |
|
441 | + if(($style=$this->getViewState('NavigationButtonStyle', null))===null) |
|
442 | 442 | { |
443 | 443 | $style=new TStyle; |
444 | - $this->setViewState('NavigationButtonStyle',$style,null); |
|
444 | + $this->setViewState('NavigationButtonStyle', $style, null); |
|
445 | 445 | } |
446 | 446 | return $style; |
447 | 447 | } |
@@ -451,11 +451,11 @@ discard block |
||
451 | 451 | */ |
452 | 452 | public function getStartNextButtonStyle() |
453 | 453 | { |
454 | - if(($style=$this->getViewState('StartNextButtonStyle',null))===null) |
|
454 | + if(($style=$this->getViewState('StartNextButtonStyle', null))===null) |
|
455 | 455 | { |
456 | 456 | $style=new TWizardNavigationButtonStyle; |
457 | 457 | $style->setButtonText('Next'); |
458 | - $this->setViewState('StartNextButtonStyle',$style,null); |
|
458 | + $this->setViewState('StartNextButtonStyle', $style, null); |
|
459 | 459 | } |
460 | 460 | return $style; |
461 | 461 | } |
@@ -465,11 +465,11 @@ discard block |
||
465 | 465 | */ |
466 | 466 | public function getStepNextButtonStyle() |
467 | 467 | { |
468 | - if(($style=$this->getViewState('StepNextButtonStyle',null))===null) |
|
468 | + if(($style=$this->getViewState('StepNextButtonStyle', null))===null) |
|
469 | 469 | { |
470 | 470 | $style=new TWizardNavigationButtonStyle; |
471 | 471 | $style->setButtonText('Next'); |
472 | - $this->setViewState('StepNextButtonStyle',$style,null); |
|
472 | + $this->setViewState('StepNextButtonStyle', $style, null); |
|
473 | 473 | } |
474 | 474 | return $style; |
475 | 475 | } |
@@ -479,11 +479,11 @@ discard block |
||
479 | 479 | */ |
480 | 480 | public function getStepPreviousButtonStyle() |
481 | 481 | { |
482 | - if(($style=$this->getViewState('StepPreviousButtonStyle',null))===null) |
|
482 | + if(($style=$this->getViewState('StepPreviousButtonStyle', null))===null) |
|
483 | 483 | { |
484 | 484 | $style=new TWizardNavigationButtonStyle; |
485 | 485 | $style->setButtonText('Previous'); |
486 | - $this->setViewState('StepPreviousButtonStyle',$style,null); |
|
486 | + $this->setViewState('StepPreviousButtonStyle', $style, null); |
|
487 | 487 | } |
488 | 488 | return $style; |
489 | 489 | } |
@@ -493,11 +493,11 @@ discard block |
||
493 | 493 | */ |
494 | 494 | public function getFinishCompleteButtonStyle() |
495 | 495 | { |
496 | - if(($style=$this->getViewState('FinishCompleteButtonStyle',null))===null) |
|
496 | + if(($style=$this->getViewState('FinishCompleteButtonStyle', null))===null) |
|
497 | 497 | { |
498 | 498 | $style=new TWizardNavigationButtonStyle; |
499 | 499 | $style->setButtonText('Complete'); |
500 | - $this->setViewState('FinishCompleteButtonStyle',$style,null); |
|
500 | + $this->setViewState('FinishCompleteButtonStyle', $style, null); |
|
501 | 501 | } |
502 | 502 | return $style; |
503 | 503 | } |
@@ -507,11 +507,11 @@ discard block |
||
507 | 507 | */ |
508 | 508 | public function getFinishPreviousButtonStyle() |
509 | 509 | { |
510 | - if(($style=$this->getViewState('FinishPreviousButtonStyle',null))===null) |
|
510 | + if(($style=$this->getViewState('FinishPreviousButtonStyle', null))===null) |
|
511 | 511 | { |
512 | 512 | $style=new TWizardNavigationButtonStyle; |
513 | 513 | $style->setButtonText('Previous'); |
514 | - $this->setViewState('FinishPreviousButtonStyle',$style,null); |
|
514 | + $this->setViewState('FinishPreviousButtonStyle', $style, null); |
|
515 | 515 | } |
516 | 516 | return $style; |
517 | 517 | } |
@@ -521,11 +521,11 @@ discard block |
||
521 | 521 | */ |
522 | 522 | public function getCancelButtonStyle() |
523 | 523 | { |
524 | - if(($style=$this->getViewState('CancelButtonStyle',null))===null) |
|
524 | + if(($style=$this->getViewState('CancelButtonStyle', null))===null) |
|
525 | 525 | { |
526 | 526 | $style=new TWizardNavigationButtonStyle; |
527 | 527 | $style->setButtonText('Cancel'); |
528 | - $this->setViewState('CancelButtonStyle',$style,null); |
|
528 | + $this->setViewState('CancelButtonStyle', $style, null); |
|
529 | 529 | } |
530 | 530 | return $style; |
531 | 531 | } |
@@ -535,10 +535,10 @@ discard block |
||
535 | 535 | */ |
536 | 536 | public function getSideBarStyle() |
537 | 537 | { |
538 | - if(($style=$this->getViewState('SideBarStyle',null))===null) |
|
538 | + if(($style=$this->getViewState('SideBarStyle', null))===null) |
|
539 | 539 | { |
540 | 540 | $style=new TPanelStyle; |
541 | - $this->setViewState('SideBarStyle',$style,null); |
|
541 | + $this->setViewState('SideBarStyle', $style, null); |
|
542 | 542 | } |
543 | 543 | return $style; |
544 | 544 | } |
@@ -548,10 +548,10 @@ discard block |
||
548 | 548 | */ |
549 | 549 | public function getHeaderStyle() |
550 | 550 | { |
551 | - if(($style=$this->getViewState('HeaderStyle',null))===null) |
|
551 | + if(($style=$this->getViewState('HeaderStyle', null))===null) |
|
552 | 552 | { |
553 | 553 | $style=new TPanelStyle; |
554 | - $this->setViewState('HeaderStyle',$style,null); |
|
554 | + $this->setViewState('HeaderStyle', $style, null); |
|
555 | 555 | } |
556 | 556 | return $style; |
557 | 557 | } |
@@ -561,10 +561,10 @@ discard block |
||
561 | 561 | */ |
562 | 562 | public function getStepStyle() |
563 | 563 | { |
564 | - if(($style=$this->getViewState('StepStyle',null))===null) |
|
564 | + if(($style=$this->getViewState('StepStyle', null))===null) |
|
565 | 565 | { |
566 | 566 | $style=new TPanelStyle; |
567 | - $this->setViewState('StepStyle',$style,null); |
|
567 | + $this->setViewState('StepStyle', $style, null); |
|
568 | 568 | } |
569 | 569 | return $style; |
570 | 570 | } |
@@ -574,10 +574,10 @@ discard block |
||
574 | 574 | */ |
575 | 575 | public function getNavigationStyle() |
576 | 576 | { |
577 | - if(($style=$this->getViewState('NavigationStyle',null))===null) |
|
577 | + if(($style=$this->getViewState('NavigationStyle', null))===null) |
|
578 | 578 | { |
579 | 579 | $style=new TPanelStyle; |
580 | - $this->setViewState('NavigationStyle',$style,null); |
|
580 | + $this->setViewState('NavigationStyle', $style, null); |
|
581 | 581 | } |
582 | 582 | return $style; |
583 | 583 | } |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | */ |
588 | 588 | public function getUseDefaultLayout() |
589 | 589 | { |
590 | - return $this->getViewState('UseDefaultLayout',true); |
|
590 | + return $this->getViewState('UseDefaultLayout', true); |
|
591 | 591 | } |
592 | 592 | |
593 | 593 | /** |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | */ |
598 | 598 | public function setUseDefaultLayout($value) |
599 | 599 | { |
600 | - $this->setViewState('UseDefaultLayout',TPropertyValue::ensureBoolean($value),true); |
|
600 | + $this->setViewState('UseDefaultLayout', TPropertyValue::ensureBoolean($value), true); |
|
601 | 601 | } |
602 | 602 | |
603 | 603 | /** |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | */ |
657 | 657 | public function onActiveStepChanged($param) |
658 | 658 | { |
659 | - $this->raiseEvent('OnActiveStepChanged',$this,$param); |
|
659 | + $this->raiseEvent('OnActiveStepChanged', $this, $param); |
|
660 | 660 | } |
661 | 661 | |
662 | 662 | /** |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | */ |
668 | 668 | public function onCancelButtonClick($param) |
669 | 669 | { |
670 | - $this->raiseEvent('OnCancelButtonClick',$this,$param); |
|
670 | + $this->raiseEvent('OnCancelButtonClick', $this, $param); |
|
671 | 671 | if(($url=$this->getCancelDestinationUrl())!=='') |
672 | 672 | $this->getResponse()->redirect($url); |
673 | 673 | } |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | */ |
681 | 681 | public function onCompleteButtonClick($param) |
682 | 682 | { |
683 | - $this->raiseEvent('OnCompleteButtonClick',$this,$param); |
|
683 | + $this->raiseEvent('OnCompleteButtonClick', $this, $param); |
|
684 | 684 | if(($url=$this->getFinishDestinationUrl())!=='') |
685 | 685 | $this->getResponse()->redirect($url); |
686 | 686 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | */ |
694 | 694 | public function onNextButtonClick($param) |
695 | 695 | { |
696 | - $this->raiseEvent('OnNextButtonClick',$this,$param); |
|
696 | + $this->raiseEvent('OnNextButtonClick', $this, $param); |
|
697 | 697 | } |
698 | 698 | |
699 | 699 | /** |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | */ |
705 | 705 | public function onPreviousButtonClick($param) |
706 | 706 | { |
707 | - $this->raiseEvent('OnPreviousButtonClick',$this,$param); |
|
707 | + $this->raiseEvent('OnPreviousButtonClick', $this, $param); |
|
708 | 708 | } |
709 | 709 | |
710 | 710 | /** |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | */ |
715 | 715 | public function onSideBarButtonClick($param) |
716 | 716 | { |
717 | - $this->raiseEvent('OnSideBarButtonClick',$this,$param); |
|
717 | + $this->raiseEvent('OnSideBarButtonClick', $this, $param); |
|
718 | 718 | } |
719 | 719 | |
720 | 720 | /** |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | { |
729 | 729 | $this->_multiView=new TMultiView; |
730 | 730 | $this->_multiView->setID('WizardMultiView'); |
731 | - $this->_multiView->attachEventHandler('OnActiveViewChanged',array($this,'onActiveStepChanged')); |
|
731 | + $this->_multiView->attachEventHandler('OnActiveViewChanged', array($this, 'onActiveStepChanged')); |
|
732 | 732 | $this->_multiView->ignoreBubbleEvents(); |
733 | 733 | } |
734 | 734 | return $this->_multiView; |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | parent::onInit($param); |
771 | 771 | $this->ensureChildControls(); |
772 | 772 | $this->setEnsureId(true); |
773 | - if($this->getActiveStepIndex()<0 && $this->getWizardSteps()->getCount()>0) |
|
773 | + if($this->getActiveStepIndex() < 0 && $this->getWizardSteps()->getCount() > 0) |
|
774 | 774 | $this->setActiveStepIndex(0); |
775 | 775 | } |
776 | 776 | |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | */ |
847 | 847 | protected function applyHeaderProperties() |
848 | 848 | { |
849 | - if(($style=$this->getViewState('HeaderStyle',null))!==null) |
|
849 | + if(($style=$this->getViewState('HeaderStyle', null))!==null) |
|
850 | 850 | $this->_header->getStyle()->mergeWith($style); |
851 | 851 | if($this->getHeaderTemplate()===null) |
852 | 852 | { |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | $this->_sideBarDataList->setDataSource($this->getWizardSteps()); |
867 | 867 | $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex()); |
868 | 868 | $this->_sideBarDataList->dataBind(); |
869 | - if(($style=$this->getViewState('SideBarButtonStyle',null))!==null) |
|
869 | + if(($style=$this->getViewState('SideBarButtonStyle', null))!==null) |
|
870 | 870 | { |
871 | 871 | foreach($this->_sideBarDataList->getItems() as $item) |
872 | 872 | { |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | } |
876 | 876 | } |
877 | 877 | } |
878 | - if(($style=$this->getViewState('SideBarStyle',null))!==null) |
|
878 | + if(($style=$this->getViewState('SideBarStyle', null))!==null) |
|
879 | 879 | $this->_sideBar->getStyle()->mergeWith($style); |
880 | 880 | } |
881 | 881 | |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | */ |
885 | 885 | protected function applyStepContentProperties() |
886 | 886 | { |
887 | - if(($style=$this->getViewState('StepStyle',null))!==null) |
|
887 | + if(($style=$this->getViewState('StepStyle', null))!==null) |
|
888 | 888 | $this->_stepContent->getStyle()->mergeWith($style); |
889 | 889 | } |
890 | 890 | |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | |
900 | 900 | if(!$this->_navigation) |
901 | 901 | return; |
902 | - else if($activeStepIndex<0 || $activeStepIndex>=$wizardSteps->getCount()) |
|
902 | + else if($activeStepIndex < 0 || $activeStepIndex >= $wizardSteps->getCount()) |
|
903 | 903 | { |
904 | 904 | $this->_navigation->setVisible(false); |
905 | 905 | return; |
@@ -930,12 +930,12 @@ discard block |
||
930 | 930 | $this->_stepNavigation->setVisible($showStandard && $activeStepType===self::ST_STEP); |
931 | 931 | $this->_finishNavigation->setVisible($showStandard && $activeStepType===self::ST_FINISH); |
932 | 932 | |
933 | - if(($navigationStyle=$this->getViewState('NavigationStyle',null))!==null) |
|
933 | + if(($navigationStyle=$this->getViewState('NavigationStyle', null))!==null) |
|
934 | 934 | $this->_navigation->getStyle()->mergeWith($navigationStyle); |
935 | 935 | |
936 | 936 | $displayCancelButton=$this->getShowCancelButton(); |
937 | 937 | $cancelButtonStyle=$this->getCancelButtonStyle(); |
938 | - $buttonStyle=$this->getViewState('NavigationButtonStyle',null); |
|
938 | + $buttonStyle=$this->getViewState('NavigationButtonStyle', null); |
|
939 | 939 | if($buttonStyle!==null) |
940 | 940 | $cancelButtonStyle->mergeWith($buttonStyle); |
941 | 941 | |
@@ -1012,10 +1012,10 @@ discard block |
||
1012 | 1012 | */ |
1013 | 1013 | protected function getHistory() |
1014 | 1014 | { |
1015 | - if(($history=$this->getControlState('History',null))===null) |
|
1015 | + if(($history=$this->getControlState('History', null))===null) |
|
1016 | 1016 | { |
1017 | 1017 | $history=new TStack; |
1018 | - $this->setControlState('History',$history); |
|
1018 | + $this->setControlState('History', $history); |
|
1019 | 1019 | } |
1020 | 1020 | return $history; |
1021 | 1021 | } |
@@ -1030,14 +1030,14 @@ discard block |
||
1030 | 1030 | if(($type=$wizardStep->getStepType())===TWizardStepType::Auto) |
1031 | 1031 | { |
1032 | 1032 | $steps=$this->getWizardSteps(); |
1033 | - if(($index=$steps->indexOf($wizardStep))>=0) |
|
1033 | + if(($index=$steps->indexOf($wizardStep)) >= 0) |
|
1034 | 1034 | { |
1035 | 1035 | $stepCount=$steps->getCount(); |
1036 | - if($stepCount===1 || ($index<$stepCount-1 && $steps->itemAt($index+1)->getStepType()===TWizardStepType::Complete)) |
|
1036 | + if($stepCount===1 || ($index < $stepCount - 1 && $steps->itemAt($index + 1)->getStepType()===TWizardStepType::Complete)) |
|
1037 | 1037 | return TWizardStepType::Finish; |
1038 | 1038 | else if($index===0) |
1039 | 1039 | return TWizardStepType::Start; |
1040 | - else if($index===$stepCount-1) |
|
1040 | + else if($index===$stepCount - 1) |
|
1041 | 1041 | return TWizardStepType::Finish; |
1042 | 1042 | else |
1043 | 1043 | return TWizardStepType::Step; |
@@ -1106,8 +1106,8 @@ discard block |
||
1106 | 1106 | |
1107 | 1107 | if(($this->_sideBarDataList=$this->_sideBar->findControl(self::ID_SIDEBAR_LIST))!==null) |
1108 | 1108 | { |
1109 | - $this->_sideBarDataList->attachEventHandler('OnItemCommand',array($this,'dataListItemCommand')); |
|
1110 | - $this->_sideBarDataList->attachEventHandler('OnItemDataBound',array($this,'dataListItemDataBound')); |
|
1109 | + $this->_sideBarDataList->attachEventHandler('OnItemCommand', array($this, 'dataListItemCommand')); |
|
1110 | + $this->_sideBarDataList->attachEventHandler('OnItemDataBound', array($this, 'dataListItemDataBound')); |
|
1111 | 1111 | $this->_sideBarDataList->setDataSource($this->getWizardSteps()); |
1112 | 1112 | $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex()); |
1113 | 1113 | $this->_sideBarDataList->dataBind(); |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | * @param mixed sender of the event |
1128 | 1128 | * @param TDataListCommandEventParameter |
1129 | 1129 | */ |
1130 | - public function dataListItemCommand($sender,$param) |
|
1130 | + public function dataListItemCommand($sender, $param) |
|
1131 | 1131 | { |
1132 | 1132 | $item=$param->getItem(); |
1133 | 1133 | if($param->getCommandName()===self::CMD_MOVETO) |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | * @param mixed sender of the event |
1164 | 1164 | * @param TDataListItemEventParameter |
1165 | 1165 | */ |
1166 | - public function dataListItemDataBound($sender,$param) |
|
1166 | + public function dataListItemDataBound($sender, $param) |
|
1167 | 1167 | { |
1168 | 1168 | $item=$param->getItem(); |
1169 | 1169 | $itemType=$item->getItemType(); |
@@ -1286,20 +1286,20 @@ discard block |
||
1286 | 1286 | protected function getPreviousStepIndex($popStack) |
1287 | 1287 | { |
1288 | 1288 | $history=$this->getHistory(); |
1289 | - if($history->getCount()>=0) |
|
1289 | + if($history->getCount() >= 0) |
|
1290 | 1290 | { |
1291 | 1291 | $activeStepIndex=$this->getActiveStepIndex(); |
1292 | 1292 | $previousStepIndex=-1; |
1293 | 1293 | if($popStack) |
1294 | 1294 | { |
1295 | 1295 | $previousStepIndex=$history->pop(); |
1296 | - if($activeStepIndex===$previousStepIndex && $history->getCount()>0) |
|
1296 | + if($activeStepIndex===$previousStepIndex && $history->getCount() > 0) |
|
1297 | 1297 | $previousStepIndex=$history->pop(); |
1298 | 1298 | } |
1299 | 1299 | else |
1300 | 1300 | { |
1301 | 1301 | $previousStepIndex=$history->peek(); |
1302 | - if($activeStepIndex===$previousStepIndex && $history->getCount()>1) |
|
1302 | + if($activeStepIndex===$previousStepIndex && $history->getCount() > 1) |
|
1303 | 1303 | { |
1304 | 1304 | $saveIndex=$history->pop(); |
1305 | 1305 | $previousStepIndex=$history->peek(); |
@@ -1343,12 +1343,12 @@ discard block |
||
1343 | 1343 | * @param TEventParameter event parameter |
1344 | 1344 | * @throws TInvalidDataValueException if a navigation command is associated with an invalid parameter |
1345 | 1345 | */ |
1346 | - public function bubbleEvent($sender,$param) |
|
1346 | + public function bubbleEvent($sender, $param) |
|
1347 | 1347 | { |
1348 | 1348 | if($param instanceof TCommandEventParameter) |
1349 | 1349 | { |
1350 | 1350 | $command=$param->getCommandName(); |
1351 | - if(strcasecmp($command,self::CMD_CANCEL)===0) |
|
1351 | + if(strcasecmp($command, self::CMD_CANCEL)===0) |
|
1352 | 1352 | { |
1353 | 1353 | $this->onCancelButtonClick($param); |
1354 | 1354 | return true; |
@@ -1364,49 +1364,49 @@ discard block |
||
1364 | 1364 | $movePrev=false; |
1365 | 1365 | $this->_activeStepIndexSet=false; |
1366 | 1366 | |
1367 | - if(strcasecmp($command,self::CMD_NEXT)===0) |
|
1367 | + if(strcasecmp($command, self::CMD_NEXT)===0) |
|
1368 | 1368 | { |
1369 | 1369 | if($type!==self::ST_START && $type!==self::ST_STEP) |
1370 | - throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_NEXT); |
|
1371 | - if($index<$this->getWizardSteps()->getCount()-1) |
|
1372 | - $navParam->setNextStepIndex($index+1); |
|
1370 | + throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_NEXT); |
|
1371 | + if($index < $this->getWizardSteps()->getCount() - 1) |
|
1372 | + $navParam->setNextStepIndex($index + 1); |
|
1373 | 1373 | $this->onNextButtonClick($navParam); |
1374 | 1374 | $handled=true; |
1375 | 1375 | } |
1376 | - else if(strcasecmp($command,self::CMD_PREVIOUS)===0) |
|
1376 | + else if(strcasecmp($command, self::CMD_PREVIOUS)===0) |
|
1377 | 1377 | { |
1378 | 1378 | if($type!==self::ST_FINISH && $type!==self::ST_STEP) |
1379 | - throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_PREVIOUS); |
|
1379 | + throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_PREVIOUS); |
|
1380 | 1380 | $movePrev=true; |
1381 | - if(($prevIndex=$this->getPreviousStepIndex(false))>=0) |
|
1381 | + if(($prevIndex=$this->getPreviousStepIndex(false)) >= 0) |
|
1382 | 1382 | $navParam->setNextStepIndex($prevIndex); |
1383 | 1383 | $this->onPreviousButtonClick($navParam); |
1384 | 1384 | $handled=true; |
1385 | 1385 | } |
1386 | - else if(strcasecmp($command,self::CMD_COMPLETE)===0) |
|
1386 | + else if(strcasecmp($command, self::CMD_COMPLETE)===0) |
|
1387 | 1387 | { |
1388 | 1388 | if($type!==self::ST_FINISH) |
1389 | - throw new TInvalidDataValueException('wizard_command_invalid',self::CMD_COMPLETE); |
|
1390 | - if($index<$this->getWizardSteps()->getCount()-1) |
|
1391 | - $navParam->setNextStepIndex($index+1); |
|
1389 | + throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_COMPLETE); |
|
1390 | + if($index < $this->getWizardSteps()->getCount() - 1) |
|
1391 | + $navParam->setNextStepIndex($index + 1); |
|
1392 | 1392 | $this->onCompleteButtonClick($navParam); |
1393 | 1393 | $handled=true; |
1394 | 1394 | } |
1395 | - else if(strcasecmp($command,self::CMD_MOVETO)===0) |
|
1395 | + else if(strcasecmp($command, self::CMD_MOVETO)===0) |
|
1396 | 1396 | { |
1397 | 1397 | if($this->_cancelNavigation) // may be set in onSideBarButtonClick |
1398 | 1398 | $navParam->setCancelNavigation(true); |
1399 | 1399 | $requestedStep=$param->getCommandParameter(); |
1400 | - if (!is_numeric($requestedStep)) |
|
1400 | + if(!is_numeric($requestedStep)) |
|
1401 | 1401 | { |
1402 | 1402 | $requestedIndex=-1; |
1403 | - foreach ($this->getWizardSteps() as $index=>$step) |
|
1404 | - if ($step->getId()===$requestedStep) |
|
1403 | + foreach($this->getWizardSteps() as $index=>$step) |
|
1404 | + if($step->getId()===$requestedStep) |
|
1405 | 1405 | { |
1406 | 1406 | $requestedIndex=$index; |
1407 | 1407 | break; |
1408 | 1408 | } |
1409 | - if ($requestedIndex<0) |
|
1409 | + if($requestedIndex < 0) |
|
1410 | 1410 | throw new TConfigurationException('wizard_step_invalid'); |
1411 | 1411 | } |
1412 | 1412 | else |
@@ -1423,7 +1423,7 @@ discard block |
||
1423 | 1423 | if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($nextStepIndex)) |
1424 | 1424 | { |
1425 | 1425 | if($movePrev) |
1426 | - $this->getPreviousStepIndex(true); // pop out the previous move from history |
|
1426 | + $this->getPreviousStepIndex(true); // pop out the previous move from history |
|
1427 | 1427 | $this->setActiveStepIndex($nextStepIndex); |
1428 | 1428 | } |
1429 | 1429 | } |
@@ -1477,7 +1477,7 @@ discard block |
||
1477 | 1477 | */ |
1478 | 1478 | public function getTitle() |
1479 | 1479 | { |
1480 | - return $this->getViewState('Title',''); |
|
1480 | + return $this->getViewState('Title', ''); |
|
1481 | 1481 | } |
1482 | 1482 | |
1483 | 1483 | /** |
@@ -1485,7 +1485,7 @@ discard block |
||
1485 | 1485 | */ |
1486 | 1486 | public function setTitle($value) |
1487 | 1487 | { |
1488 | - $this->setViewState('Title',$value,''); |
|
1488 | + $this->setViewState('Title', $value, ''); |
|
1489 | 1489 | if($this->_wizard) |
1490 | 1490 | $this->_wizard->wizardStepsChanged(); |
1491 | 1491 | } |
@@ -1495,7 +1495,7 @@ discard block |
||
1495 | 1495 | */ |
1496 | 1496 | public function getAllowReturn() |
1497 | 1497 | { |
1498 | - return $this->getViewState('AllowReturn',true); |
|
1498 | + return $this->getViewState('AllowReturn', true); |
|
1499 | 1499 | } |
1500 | 1500 | |
1501 | 1501 | /** |
@@ -1503,7 +1503,7 @@ discard block |
||
1503 | 1503 | */ |
1504 | 1504 | public function setAllowReturn($value) |
1505 | 1505 | { |
1506 | - $this->setViewState('AllowReturn',TPropertyValue::ensureBoolean($value),true); |
|
1506 | + $this->setViewState('AllowReturn', TPropertyValue::ensureBoolean($value), true); |
|
1507 | 1507 | } |
1508 | 1508 | |
1509 | 1509 | /** |
@@ -1511,7 +1511,7 @@ discard block |
||
1511 | 1511 | */ |
1512 | 1512 | public function getStepType() |
1513 | 1513 | { |
1514 | - return $this->getViewState('StepType',TWizardStepType::Auto); |
|
1514 | + return $this->getViewState('StepType', TWizardStepType::Auto); |
|
1515 | 1515 | } |
1516 | 1516 | |
1517 | 1517 | /** |
@@ -1519,10 +1519,10 @@ discard block |
||
1519 | 1519 | */ |
1520 | 1520 | public function setStepType($type) |
1521 | 1521 | { |
1522 | - $type=TPropertyValue::ensureEnum($type,'TWizardStepType'); |
|
1522 | + $type=TPropertyValue::ensureEnum($type, 'TWizardStepType'); |
|
1523 | 1523 | if($type!==$this->getStepType()) |
1524 | 1524 | { |
1525 | - $this->setViewState('StepType',$type,TWizardStepType::Auto); |
|
1525 | + $this->setViewState('StepType', $type, TWizardStepType::Auto); |
|
1526 | 1526 | if($this->_wizard) |
1527 | 1527 | $this->_wizard->wizardStepsChanged(); |
1528 | 1528 | } |
@@ -1698,12 +1698,12 @@ discard block |
||
1698 | 1698 | * @param mixed new item |
1699 | 1699 | * @throws TInvalidDataTypeException if the item being added is not TWizardStep. |
1700 | 1700 | */ |
1701 | - public function insertAt($index,$item) |
|
1701 | + public function insertAt($index, $item) |
|
1702 | 1702 | { |
1703 | 1703 | if($item instanceof TWizardStep) |
1704 | 1704 | { |
1705 | - parent::insertAt($index,$item); |
|
1706 | - $this->_wizard->getMultiView()->getViews()->insertAt($index,$item); |
|
1705 | + parent::insertAt($index, $item); |
|
1706 | + $this->_wizard->getMultiView()->getViews()->insertAt($index, $item); |
|
1707 | 1707 | $this->_wizard->addedWizardStep($item); |
1708 | 1708 | } |
1709 | 1709 | else |
@@ -1977,7 +1977,7 @@ discard block |
||
1977 | 1977 | * @param string command name for the button's OnCommand event |
1978 | 1978 | * @throws TInvalidDataValueException if the button type is not recognized |
1979 | 1979 | */ |
1980 | - protected function createNavigationButton($buttonStyle,$causesValidation,$commandName) |
|
1980 | + protected function createNavigationButton($buttonStyle, $causesValidation, $commandName) |
|
1981 | 1981 | { |
1982 | 1982 | switch($buttonStyle->getButtonType()) |
1983 | 1983 | { |
@@ -1992,7 +1992,7 @@ discard block |
||
1992 | 1992 | $button->setImageUrl($buttonStyle->getImageUrl()); |
1993 | 1993 | break; |
1994 | 1994 | default: |
1995 | - throw new TInvalidDataValueException('wizard_buttontype_unknown',$buttonStyle->getButtonType()); |
|
1995 | + throw new TInvalidDataValueException('wizard_buttontype_unknown', $buttonStyle->getButtonType()); |
|
1996 | 1996 | } |
1997 | 1997 | $button->setText($buttonStyle->getButtonText()); |
1998 | 1998 | $button->setCausesValidation($causesValidation); |
@@ -2017,8 +2017,8 @@ discard block |
||
2017 | 2017 | */ |
2018 | 2018 | public function instantiateIn($parent) |
2019 | 2019 | { |
2020 | - $nextButton=$this->createNavigationButton($this->getWizard()->getStartNextButtonStyle(),true,TWizard::CMD_NEXT); |
|
2021 | - $cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(),false,TWizard::CMD_CANCEL); |
|
2020 | + $nextButton=$this->createNavigationButton($this->getWizard()->getStartNextButtonStyle(), true, TWizard::CMD_NEXT); |
|
2021 | + $cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(), false, TWizard::CMD_CANCEL); |
|
2022 | 2022 | |
2023 | 2023 | $controls=$parent->getControls(); |
2024 | 2024 | $controls->add($nextButton); |
@@ -2046,9 +2046,9 @@ discard block |
||
2046 | 2046 | */ |
2047 | 2047 | public function instantiateIn($parent) |
2048 | 2048 | { |
2049 | - $previousButton=$this->createNavigationButton($this->getWizard()->getFinishPreviousButtonStyle(),false,TWizard::CMD_PREVIOUS); |
|
2050 | - $completeButton=$this->createNavigationButton($this->getWizard()->getFinishCompleteButtonStyle(),true,TWizard::CMD_COMPLETE); |
|
2051 | - $cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(),false,TWizard::CMD_CANCEL); |
|
2049 | + $previousButton=$this->createNavigationButton($this->getWizard()->getFinishPreviousButtonStyle(), false, TWizard::CMD_PREVIOUS); |
|
2050 | + $completeButton=$this->createNavigationButton($this->getWizard()->getFinishCompleteButtonStyle(), true, TWizard::CMD_COMPLETE); |
|
2051 | + $cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(), false, TWizard::CMD_CANCEL); |
|
2052 | 2052 | |
2053 | 2053 | $controls=$parent->getControls(); |
2054 | 2054 | $controls->add($previousButton); |
@@ -2079,9 +2079,9 @@ discard block |
||
2079 | 2079 | */ |
2080 | 2080 | public function instantiateIn($parent) |
2081 | 2081 | { |
2082 | - $previousButton=$this->createNavigationButton($this->getWizard()->getStepPreviousButtonStyle(),false,TWizard::CMD_PREVIOUS); |
|
2083 | - $nextButton=$this->createNavigationButton($this->getWizard()->getStepNextButtonStyle(),true,TWizard::CMD_NEXT); |
|
2084 | - $cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(),false,TWizard::CMD_CANCEL); |
|
2082 | + $previousButton=$this->createNavigationButton($this->getWizard()->getStepPreviousButtonStyle(), false, TWizard::CMD_PREVIOUS); |
|
2083 | + $nextButton=$this->createNavigationButton($this->getWizard()->getStepNextButtonStyle(), true, TWizard::CMD_NEXT); |
|
2084 | + $cancelButton=$this->createNavigationButton($this->getWizard()->getCancelButtonStyle(), false, TWizard::CMD_CANCEL); |
|
2085 | 2085 | |
2086 | 2086 | $controls=$parent->getControls(); |
2087 | 2087 | $controls->add($previousButton); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function getTableSection() |
125 | 125 | { |
126 | - return $this->getViewState('TableSection',TTableRowSection::Body); |
|
126 | + return $this->getViewState('TableSection', TTableRowSection::Body); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function setTableSection($value) |
133 | 133 | { |
134 | - $this->setViewState('TableSection',TPropertyValue::ensureEnum($value,'TTableRowSection'),TTableRowSection::Body); |
|
134 | + $this->setViewState('TableSection', TPropertyValue::ensureEnum($value, 'TTableRowSection'), TTableRowSection::Body); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -171,10 +171,10 @@ discard block |
||
171 | 171 | * @param mixed new item |
172 | 172 | * @throws TInvalidDataTypeException if the item to be inserted is not a TTableCell object. |
173 | 173 | */ |
174 | - public function insertAt($index,$item) |
|
174 | + public function insertAt($index, $item) |
|
175 | 175 | { |
176 | 176 | if($item instanceof TTableCell) |
177 | - parent::insertAt($index,$item); |
|
177 | + parent::insertAt($index, $item); |
|
178 | 178 | else |
179 | 179 | throw new TInvalidDataTypeException('tablecellcollection_tablecell_required'); |
180 | 180 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function getForControl() |
44 | 44 | { |
45 | - return $this->getViewState('ForControl',''); |
|
45 | + return $this->getViewState('ForControl', ''); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | parent::addAttributesToRender($writer); |
133 | 133 | if($this->getPage()->getClientSupportsJavaScript()) |
134 | - $writer->addAttribute('id',$this->getClientID()); |
|
134 | + $writer->addAttribute('id', $this->getClientID()); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | { |
144 | 144 | if(($url=$this->getCssUrl())==='') |
145 | 145 | $url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'keyboard.css'); |
146 | - $this->getPage()->getClientScript()->registerStyleSheetFile($url,$url); |
|
146 | + $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -174,12 +174,12 @@ discard block |
||
174 | 174 | if(($forControl=$this->getForControl())==='') |
175 | 175 | throw new TConfigurationException('keyboard_forcontrol_required'); |
176 | 176 | if(($target=$this->findControl($forControl))===null) |
177 | - throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl); |
|
177 | + throw new TConfigurationException('keyboard_forcontrol_invalid', $forControl); |
|
178 | 178 | |
179 | - $options['ID'] = $this->getClientID(); |
|
180 | - $options['ForControl'] = $target->getClientID(); |
|
181 | - $options['AutoHide'] = $this->getAutoHide(); |
|
182 | - $options['CssClass'] = $this->getKeyboardCssClass(); |
|
179 | + $options['ID']=$this->getClientID(); |
|
180 | + $options['ForControl']=$target->getClientID(); |
|
181 | + $options['AutoHide']=$this->getAutoHide(); |
|
182 | + $options['CssClass']=$this->getKeyboardCssClass(); |
|
183 | 183 | |
184 | 184 | return $options; |
185 | 185 | } |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function addAttributesToRender($writer) |
41 | 41 | { |
42 | - $writer->addAttribute('src',$this->getImageUrl()); |
|
43 | - $writer->addAttribute('alt',$this->getAlternateText()); |
|
42 | + $writer->addAttribute('src', $this->getImageUrl()); |
|
43 | + $writer->addAttribute('alt', $this->getAlternateText()); |
|
44 | 44 | if(($desc=$this->getDescriptionUrl())!=='') |
45 | - $writer->addAttribute('longdesc',$desc); |
|
45 | + $writer->addAttribute('longdesc', $desc); |
|
46 | 46 | if(($align=$this->getImageAlign())!=='') |
47 | - $writer->addAttribute('align',$align); |
|
47 | + $writer->addAttribute('align', $align); |
|
48 | 48 | parent::addAttributesToRender($writer); |
49 | 49 | } |
50 | 50 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function getAlternateText() |
64 | 64 | { |
65 | - return $this->getViewState('AlternateText',''); |
|
65 | + return $this->getViewState('AlternateText', ''); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function setAlternateText($value) |
73 | 73 | { |
74 | - $this->setViewState('AlternateText',$value,''); |
|
74 | + $this->setViewState('AlternateText', $value, ''); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function getImageAlign() |
81 | 81 | { |
82 | - return $this->getViewState('ImageAlign',''); |
|
82 | + return $this->getViewState('ImageAlign', ''); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function setImageAlign($value) |
93 | 93 | { |
94 | - $this->setViewState('ImageAlign',$value,''); |
|
94 | + $this->setViewState('ImageAlign', $value, ''); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function getImageUrl() |
101 | 101 | { |
102 | - return $this->getViewState('ImageUrl',''); |
|
102 | + return $this->getViewState('ImageUrl', ''); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function setImageUrl($value) |
109 | 109 | { |
110 | - $this->setViewState('ImageUrl',$value,''); |
|
110 | + $this->setViewState('ImageUrl', $value, ''); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | /** |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function getDescriptionUrl() |
143 | 143 | { |
144 | - return $this->getViewState('DescriptionUrl',''); |
|
144 | + return $this->getViewState('DescriptionUrl', ''); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function setDescriptionUrl($value) |
151 | 151 | { |
152 | - $this->setViewState('DescriptionUrl',$value,''); |
|
152 | + $this->setViewState('DescriptionUrl', $value, ''); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 |