@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return [ |
67 | 67 | 'text' => $this->getText(), |
68 | 68 | 'click' => new TJavaScriptLiteral("function(){new Prado.Callback('" . $this->getUniqueID() . "', 'onClick');}" |
69 | - )] ; |
|
69 | + )]; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * Raises the OnClick event |
90 | 90 | * @param object $params event parameters |
91 | 91 | */ |
92 | - public function onClick ($params) |
|
92 | + public function onClick($params) |
|
93 | 93 | { |
94 | 94 | $this->raiseEvent('OnClick', $this, $params); |
95 | 95 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function getOptions() |
74 | 74 | { |
75 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
75 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
76 | 76 | { |
77 | 77 | $options = new TJuiControlOptions($this); |
78 | 78 | $this->setViewState('JuiOptions', $options); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * Raises the OnCreate event |
145 | 145 | * @param object $params event parameters |
146 | 146 | */ |
147 | - public function onOpen ($params) |
|
147 | + public function onOpen($params) |
|
148 | 148 | { |
149 | 149 | $this->raiseEvent('OnOpen', $this, $params); |
150 | 150 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function getOptions() |
80 | 80 | { |
81 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
81 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
82 | 82 | { |
83 | 83 | $options = new TJuiControlOptions($this); |
84 | 84 | $this->setViewState('JuiOptions', $options); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * Raises the OnActivate event |
148 | 148 | * @param object $params event parameters |
149 | 149 | */ |
150 | - public function onActivate ($params) |
|
150 | + public function onActivate($params) |
|
151 | 151 | { |
152 | 152 | $this->raiseEvent('OnActivate', $this, $params); |
153 | 153 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | * Raises the OnBeforeStop event |
157 | 157 | * @param object $params event parameters |
158 | 158 | */ |
159 | - public function onBeforeStop ($params) |
|
159 | + public function onBeforeStop($params) |
|
160 | 160 | { |
161 | 161 | $this->raiseEvent('OnBeforeStop', $this, $params); |
162 | 162 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * Raises the OnChange event |
166 | 166 | * @param object $params event parameters |
167 | 167 | */ |
168 | - public function onChange ($params) |
|
168 | + public function onChange($params) |
|
169 | 169 | { |
170 | 170 | $this->raiseEvent('OnChange', $this, $params); |
171 | 171 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * Raises the OnCreate event |
175 | 175 | * @param object $params event parameters |
176 | 176 | */ |
177 | - public function onCreate ($params) |
|
177 | + public function onCreate($params) |
|
178 | 178 | { |
179 | 179 | $this->raiseEvent('OnCreate', $this, $params); |
180 | 180 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * Raises the OnDeactivate event |
184 | 184 | * @param object $params event parameters |
185 | 185 | */ |
186 | - public function onDeactivate ($params) |
|
186 | + public function onDeactivate($params) |
|
187 | 187 | { |
188 | 188 | $this->raiseEvent('OnDeactivate', $this, $params); |
189 | 189 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * Raises the OnOut event |
193 | 193 | * @param object $params event parameters |
194 | 194 | */ |
195 | - public function onOut ($params) |
|
195 | + public function onOut($params) |
|
196 | 196 | { |
197 | 197 | $this->raiseEvent('OnOut', $this, $params); |
198 | 198 | } |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | * Raises the OnOver event |
202 | 202 | * @param object $params event parameters |
203 | 203 | */ |
204 | - public function onOver ($params) |
|
204 | + public function onOver($params) |
|
205 | 205 | { |
206 | 206 | $this->raiseEvent('OnOver', $this, $params); |
207 | 207 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * Raises the OnReceive event |
211 | 211 | * @param object $params event parameters |
212 | 212 | */ |
213 | - public function onReceive ($params) |
|
213 | + public function onReceive($params) |
|
214 | 214 | { |
215 | 215 | $this->raiseEvent('OnReceive', $this, $params); |
216 | 216 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | * Raises the OnRemove event |
220 | 220 | * @param object $params event parameters |
221 | 221 | */ |
222 | - public function onRemove ($params) |
|
222 | + public function onRemove($params) |
|
223 | 223 | { |
224 | 224 | $this->raiseEvent('OnRemove', $this, $params); |
225 | 225 | } |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | * Raises the OnSort event |
229 | 229 | * @param object $params event parameters |
230 | 230 | */ |
231 | - public function onSort ($params) |
|
231 | + public function onSort($params) |
|
232 | 232 | { |
233 | 233 | $this->raiseEvent('OnSort', $this, $params); |
234 | 234 | } |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | * Raises the OnStart event |
238 | 238 | * @param object $params event parameters |
239 | 239 | */ |
240 | - public function onStart ($params) |
|
240 | + public function onStart($params) |
|
241 | 241 | { |
242 | 242 | $this->raiseEvent('OnStart', $this, $params); |
243 | 243 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | * Raises the OnStop event |
247 | 247 | * @param object $params event parameters |
248 | 248 | */ |
249 | - public function OnStop ($params) |
|
249 | + public function OnStop($params) |
|
250 | 250 | { |
251 | 251 | $this->raiseEvent('OnStop', $this, $params); |
252 | 252 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | * Raises the OnUpdate event |
256 | 256 | * @param object $params event parameters |
257 | 257 | */ |
258 | - public function onUpdate ($params) |
|
258 | + public function onUpdate($params) |
|
259 | 259 | { |
260 | 260 | $this->raiseEvent('OnUpdate', $this, $params); |
261 | 261 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function getOptions() |
99 | 99 | { |
100 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
100 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
101 | 101 | { |
102 | 102 | $options = new TJuiControlOptions($this); |
103 | 103 | $this->setViewState('JuiOptions', $options); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * Raises the OnActivate event |
161 | 161 | * @param object $params event parameters |
162 | 162 | */ |
163 | - public function onActivate ($params) |
|
163 | + public function onActivate($params) |
|
164 | 164 | { |
165 | 165 | $this->raiseEvent('OnActivate', $this, $params); |
166 | 166 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * Raises the OnCreate event |
170 | 170 | * @param object $params event parameters |
171 | 171 | */ |
172 | - public function onCreate ($params) |
|
172 | + public function onCreate($params) |
|
173 | 173 | { |
174 | 174 | $this->raiseEvent('OnCreate', $this, $params); |
175 | 175 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Raises the OnDeactivate event |
179 | 179 | * @param object $params event parameters |
180 | 180 | */ |
181 | - public function onDeactivate ($params) |
|
181 | + public function onDeactivate($params) |
|
182 | 182 | { |
183 | 183 | $this->raiseEvent('OnDeactivate', $this, $params); |
184 | 184 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | * Raises the OnDrop event |
188 | 188 | * @param object $params event parameters |
189 | 189 | */ |
190 | - public function onDrop ($params) |
|
190 | + public function onDrop($params) |
|
191 | 191 | { |
192 | 192 | $this->raiseEvent('OnDrop', $this, $params); |
193 | 193 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | * Raises the OnOut event |
197 | 197 | * @param object $params event parameters |
198 | 198 | */ |
199 | - public function OnOut ($params) |
|
199 | + public function OnOut($params) |
|
200 | 200 | { |
201 | 201 | $this->raiseEvent('OnOut', $this, $params); |
202 | 202 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * Raises the OnOver event |
206 | 206 | * @param object $params event parameters |
207 | 207 | */ |
208 | - public function OnOver ($params) |
|
208 | + public function OnOver($params) |
|
209 | 209 | { |
210 | 210 | $this->raiseEvent('OnOver', $this, $params); |
211 | 211 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function getOptions() |
79 | 79 | { |
80 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
80 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
81 | 81 | { |
82 | 82 | $options = new TJuiControlOptions($this); |
83 | 83 | $this->setViewState('JuiOptions', $options); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * Raises the OnCreate event |
141 | 141 | * @param object $params event parameters |
142 | 142 | */ |
143 | - public function onCreate ($params) |
|
143 | + public function onCreate($params) |
|
144 | 144 | { |
145 | 145 | $this->raiseEvent('OnCreate', $this, $params); |
146 | 146 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * Raises the OnDrag event |
150 | 150 | * @param object $params event parameters |
151 | 151 | */ |
152 | - public function onDrag ($params) |
|
152 | + public function onDrag($params) |
|
153 | 153 | { |
154 | 154 | $this->raiseEvent('OnDrag', $this, $params); |
155 | 155 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * Raises the OnStart event |
159 | 159 | * @param object $params event parameters |
160 | 160 | */ |
161 | - public function onStart ($params) |
|
161 | + public function onStart($params) |
|
162 | 162 | { |
163 | 163 | $this->raiseEvent('OnStart', $this, $params); |
164 | 164 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * Raises the OnStop event |
168 | 168 | * @param object $params event parameters |
169 | 169 | */ |
170 | - public function onStop ($params) |
|
170 | + public function onStop($params) |
|
171 | 171 | { |
172 | 172 | $this->raiseEvent('OnStop', $this, $params); |
173 | 173 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function getOptions() |
75 | 75 | { |
76 | - if (($options = $this->getViewState('JuiOptions')) === null) |
|
76 | + if(($options = $this->getViewState('JuiOptions')) === null) |
|
77 | 77 | { |
78 | 78 | $options = new TJuiControlOptions($this); |
79 | 79 | $this->setViewState('JuiOptions', $options); |
@@ -182,7 +182,7 @@ |
||
182 | 182 | */ |
183 | 183 | public function save($data) |
184 | 184 | { |
185 | - $timestamp = (string)microtime(true); |
|
185 | + $timestamp = (string) microtime(true); |
|
186 | 186 | $key = $this->calculateKey($timestamp); |
187 | 187 | $this->getCache()->add($key, $data, $this->_timeout); |
188 | 188 | $this->_page->setClientState(TPageStateFormatter::serialize($this->_page, $timestamp)); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | self::$_scriptsPackages = $packages; |
180 | 180 | } |
181 | 181 | |
182 | - if (isset(self::$_scripts[$name])) |
|
182 | + if(isset(self::$_scripts[$name])) |
|
183 | 183 | $this->_registeredScripts[$name] = true; |
184 | 184 | else |
185 | 185 | throw new TInvalidOperationException('csmanager_pradoscript_invalid', $name); |
@@ -188,13 +188,13 @@ discard block |
||
188 | 188 | { |
189 | 189 | $packagesUrl = []; |
190 | 190 | $isDebug = $this->getApplication()->getMode() === TApplicationMode::Debug; |
191 | - foreach ($packages as $p) |
|
191 | + foreach($packages as $p) |
|
192 | 192 | { |
193 | - foreach (self::$_scripts[$p] as $dep) |
|
193 | + foreach(self::$_scripts[$p] as $dep) |
|
194 | 194 | { |
195 | - foreach (self::$_scriptsPackages[$dep] as $script) |
|
195 | + foreach(self::$_scriptsPackages[$dep] as $script) |
|
196 | 196 | { |
197 | - if (!isset($this->_expandedScripts[$script])) |
|
197 | + if(!isset($this->_expandedScripts[$script])) |
|
198 | 198 | { |
199 | 199 | list($base, $subPath) = $this->getScriptPackageFolder($script); |
200 | 200 | list($path, $baseUrl) = $this->getPackagePathUrl($base); |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | $this->_expandedScripts[$script] = true; |
203 | 203 | if($isDebug) |
204 | 204 | { |
205 | - if (!in_array($url = $baseUrl . '/' . $subPath, $packagesUrl)) |
|
205 | + if(!in_array($url = $baseUrl . '/' . $subPath, $packagesUrl)) |
|
206 | 206 | $packagesUrl[] = $url; |
207 | 207 | } else { |
208 | 208 | $minPath = preg_replace('/^(.*)(?<!\.min)\.js$/', "\\1.min.js", $subPath); |
209 | - if (!in_array($url = $baseUrl . '/' . $minPath, $packagesUrl)) |
|
209 | + if(!in_array($url = $baseUrl . '/' . $minPath, $packagesUrl)) |
|
210 | 210 | { |
211 | 211 | if(!is_file($filePath = $path . DIRECTORY_SEPARATOR . $minPath)) |
212 | 212 | { |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | */ |
386 | 386 | public function registerDefaultButton($panel, $button) |
387 | 387 | { |
388 | - $panelID = is_string($panel)?$panel:$panel->getUniqueID(); |
|
388 | + $panelID = is_string($panel) ? $panel : $panel->getUniqueID(); |
|
389 | 389 | |
390 | 390 | if(is_string($button)) |
391 | 391 | $buttonID = $button; |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $this->_endScripts['prado:' . $panelID] = $code; |
401 | 401 | $this->registerPradoScriptInternal('prado'); |
402 | 402 | |
403 | - $params = [$panelID,$buttonID]; |
|
403 | + $params = [$panelID, $buttonID]; |
|
404 | 404 | $this->_page->registerCachingAction('Page.ClientScript', 'registerDefaultButton', $params); |
405 | 405 | } |
406 | 406 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | self::$_stylesPackages = $packages; |
464 | 464 | } |
465 | 465 | |
466 | - if (isset(self::$_styles[$name])) |
|
466 | + if(isset(self::$_styles[$name])) |
|
467 | 467 | $this->_registeredStyles[$name] = true; |
468 | 468 | else |
469 | 469 | throw new TInvalidOperationException('csmanager_pradostyle_invalid', $name); |
@@ -472,20 +472,20 @@ discard block |
||
472 | 472 | { |
473 | 473 | $packagesUrl = []; |
474 | 474 | $isDebug = $this->getApplication()->getMode() === TApplicationMode::Debug; |
475 | - foreach ($packages as $p) |
|
475 | + foreach($packages as $p) |
|
476 | 476 | { |
477 | - foreach (self::$_styles[$p] as $dep) |
|
477 | + foreach(self::$_styles[$p] as $dep) |
|
478 | 478 | { |
479 | - foreach (self::$_stylesPackages[$dep] as $style) |
|
479 | + foreach(self::$_stylesPackages[$dep] as $style) |
|
480 | 480 | { |
481 | - if (!isset($this->_expandedStyles[$style])) |
|
481 | + if(!isset($this->_expandedStyles[$style])) |
|
482 | 482 | { |
483 | 483 | list($base, $subPath) = $this->getStylePackageFolder($style); |
484 | 484 | list($path, $baseUrl) = $this->getPackagePathUrl($base); |
485 | 485 | |
486 | 486 | $this->_expandedStyles[$style] = true; |
487 | 487 | // TODO minify css? |
488 | - if (!in_array($url = $baseUrl . '/' . $subPath, $packagesUrl)) |
|
488 | + if(!in_array($url = $baseUrl . '/' . $subPath, $packagesUrl)) |
|
489 | 489 | $packagesUrl[] = $url; |
490 | 490 | } |
491 | 491 | } |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | if($media === '') |
525 | 525 | $this->_styleSheetFiles[$key] = $url; |
526 | 526 | else |
527 | - $this->_styleSheetFiles[$key] = [$url,$media]; |
|
527 | + $this->_styleSheetFiles[$key] = [$url, $media]; |
|
528 | 528 | |
529 | 529 | $params = func_get_args(); |
530 | 530 | $this->_page->registerCachingAction('Page.ClientScript', 'registerStyleSheetFile', $params); |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | ); |
557 | 557 | |
558 | 558 | foreach(Prado::getApplication()->getAssetManager()->getPublished() as $path => $url) |
559 | - if (substr($url, strlen($url) - 4) == '.css') |
|
559 | + if(substr($url, strlen($url) - 4) == '.css') |
|
560 | 560 | $stylesheets[] = $url; |
561 | 561 | |
562 | 562 | $stylesheets = array_unique($stylesheets); |
@@ -893,11 +893,11 @@ discard block |
||
893 | 893 | |
894 | 894 | protected function renderHiddenFieldsInt($writer, $initial) |
895 | 895 | { |
896 | - if ($initial) $this->_renderedHiddenFields = []; |
|
896 | + if($initial) $this->_renderedHiddenFields = []; |
|
897 | 897 | $str = ''; |
898 | 898 | foreach($this->_hiddenFields as $name => $value) |
899 | 899 | { |
900 | - if (in_array($name, $this->_renderedHiddenFields)) continue; |
|
900 | + if(in_array($name, $this->_renderedHiddenFields)) continue; |
|
901 | 901 | $id = strtr($name, ':', '_'); |
902 | 902 | if(is_array($value)) |
903 | 903 | { |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | */ |
925 | 925 | protected function checkIfNotInRender() |
926 | 926 | { |
927 | - if ($form = $this->_page->InFormRender) |
|
927 | + if($form = $this->_page->InFormRender) |
|
928 | 928 | throw new \Exception('Operation invalid when page is already rendering'); |
929 | 929 | } |
930 | 930 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | public function getRating() |
108 | 108 | { |
109 | 109 | $rating = $this->getViewState('Rating', null); |
110 | - if ($rating === null) |
|
110 | + if($rating === null) |
|
111 | 111 | return $this->getSelectedIndex() + 1; |
112 | 112 | else |
113 | 113 | return $rating; |