@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | protected function getViewState($key, $defaultValue = null) |
42 | 42 | { |
43 | - return isset($this->_viewState[$key])?$this->_viewState[$key]:$defaultValue; |
|
43 | + return isset($this->_viewState[$key]) ? $this->_viewState[$key] : $defaultValue; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -305,8 +305,7 @@ discard block |
||
305 | 305 | $writer->addAttribute('href', $this->getNavigateUrl()); |
306 | 306 | if(($target = $this->getTarget()) !== '') |
307 | 307 | $writer->addAttribute('target', $target); |
308 | - } |
|
309 | - elseif($mode === THotSpotMode::Inactive) |
|
308 | + } elseif($mode === THotSpotMode::Inactive) |
|
310 | 309 | $writer->addAttribute('nohref', 'true'); |
311 | 310 | $text = $this->getAlternateText(); |
312 | 311 | $writer->addAttribute('title', $text); |
@@ -317,8 +316,9 @@ discard block |
||
317 | 316 | $writer->addAttribute('tabindex', "$tabIndex"); |
318 | 317 | if($this->getHasAttributes()) |
319 | 318 | { |
320 | - foreach($this->getAttributes() as $name => $value) |
|
321 | - $writer->addAttribute($name, $value); |
|
319 | + foreach($this->getAttributes() as $name => $value) { |
|
320 | + $writer->addAttribute($name, $value); |
|
321 | + } |
|
322 | 322 | } |
323 | 323 | $writer->renderBeginTag('area'); |
324 | 324 | $writer->renderEndTag(); |
@@ -425,8 +425,7 @@ discard block |
||
425 | 425 | { |
426 | 426 | parent::render($writer); |
427 | 427 | $this->renderDatePickerButtons($writer); |
428 | - } |
|
429 | - else |
|
428 | + } else |
|
430 | 429 | { |
431 | 430 | $this->renderDropDownListCalendar($writer); |
432 | 431 | if($this->hasDayPattern()) |
@@ -473,8 +472,7 @@ discard block |
||
473 | 472 | { |
474 | 473 | $this->setText($value); |
475 | 474 | return true; |
476 | - } |
|
477 | - else |
|
475 | + } else |
|
478 | 476 | return false; |
479 | 477 | } |
480 | 478 | |
@@ -752,11 +750,14 @@ discard block |
||
752 | 750 | case 'MMM': return $info->getAbbreviatedMonthNames(); |
753 | 751 | case 'MM': |
754 | 752 | $array = []; |
755 | - for($i = 1;$i <= 12;$i++) |
|
756 | - $array[$i - 1] = $i < 10 ? '0' . $i : $i; |
|
753 | + for($i = 1;$i <= 12;$i++) { |
|
754 | + $array[$i - 1] = $i < 10 ? '0' . $i : $i; |
|
755 | + } |
|
757 | 756 | return $array; |
758 | 757 | case 'M': |
759 | - $array = []; for($i = 1;$i <= 12;$i++) $array[$i - 1] = $i; |
|
758 | + $array = []; for($i = 1;$i <= 12;$i++) { |
|
759 | + $array[$i - 1] = $i; |
|
760 | + } |
|
760 | 761 | return $array; |
761 | 762 | default : return $info->getMonthNames(); |
762 | 763 | } |
@@ -770,8 +771,9 @@ discard block |
||
770 | 771 | protected function renderCalendarYearOptions($writer, $selected = null) |
771 | 772 | { |
772 | 773 | $years = []; |
773 | - for($i = $this->getFromYear(); $i <= $this->getUpToYear(); $i++) |
|
774 | - $years[$i] = $i; |
|
774 | + for($i = $this->getFromYear(); $i <= $this->getUpToYear(); $i++) { |
|
775 | + $years[$i] = $i; |
|
776 | + } |
|
775 | 777 | $writer->addAttribute('id', $this->getClientID() . TControl::CLIENT_ID_SEPARATOR . 'year'); |
776 | 778 | $writer->addAttribute('name', $this->getUniqueID() . TControl::ID_SEPARATOR . 'year'); |
777 | 779 | $writer->addAttribute('class', 'datepicker_year_options'); |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | { |
445 | 445 | if($this->getShowCalendar()) |
446 | 446 | { |
447 | - switch ($this->getMode()) |
|
447 | + switch($this->getMode()) |
|
448 | 448 | { |
449 | 449 | case TDatePickerMode::Button: |
450 | 450 | $this->renderButtonDatePicker($writer); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $date = @getdate(); |
490 | 490 | |
491 | 491 | $pattern = $this->getDateFormat(); |
492 | - $pattern = str_replace(['MMMM', 'MMM'], ['MM','MM'], $pattern); |
|
492 | + $pattern = str_replace(['MMMM', 'MMM'], ['MM', 'MM'], $pattern); |
|
493 | 493 | $formatter = new TSimpleDateFormatter($pattern); |
494 | 494 | |
495 | 495 | $order = $formatter->getDayMonthYearOrdering(); |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | //$date = @mktime(0, 0, 0, $month, $day, $year); |
520 | 520 | |
521 | 521 | $pattern = $this->getDateFormat(); |
522 | - $pattern = str_replace(['MMMM', 'MMM'], ['MM','MM'], $pattern); |
|
522 | + $pattern = str_replace(['MMMM', 'MMM'], ['MM', 'MM'], $pattern); |
|
523 | 523 | |
524 | 524 | $formatter = new TSimpleDateFormatter($pattern); |
525 | 525 | return $formatter->format($date); |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | protected function getTimeStampFromText() |
662 | 662 | { |
663 | 663 | $pattern = $this->getDateFormat(); |
664 | - $pattern = str_replace(['MMMM', 'MMM'], ['MM','MM'], $pattern); |
|
664 | + $pattern = str_replace(['MMMM', 'MMM'], ['MM', 'MM'], $pattern); |
|
665 | 665 | $formatter = new TSimpleDateFormatter($pattern); |
666 | 666 | return $formatter->parse($this->getText()); |
667 | 667 | } |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | $formatter = new TSimpleDateFormatter($this->getDateFormat()); |
712 | 712 | $days = []; |
713 | 713 | $requiresPadding = $formatter->getDayPattern() === 'dd'; |
714 | - for($i = 1;$i <= 31;$i++) |
|
714 | + for($i = 1; $i <= 31; $i++) |
|
715 | 715 | { |
716 | 716 | $days[$i] = $requiresPadding ? str_pad($i, 2, '0', STR_PAD_LEFT) : $i; |
717 | 717 | } |
@@ -752,11 +752,11 @@ discard block |
||
752 | 752 | case 'MMM': return $info->getAbbreviatedMonthNames(); |
753 | 753 | case 'MM': |
754 | 754 | $array = []; |
755 | - for($i = 1;$i <= 12;$i++) |
|
755 | + for($i = 1; $i <= 12; $i++) |
|
756 | 756 | $array[$i - 1] = $i < 10 ? '0' . $i : $i; |
757 | 757 | return $array; |
758 | 758 | case 'M': |
759 | - $array = []; for($i = 1;$i <= 12;$i++) $array[$i - 1] = $i; |
|
759 | + $array = []; for($i = 1; $i <= 12; $i++) $array[$i - 1] = $i; |
|
760 | 760 | return $array; |
761 | 761 | default : return $info->getMonthNames(); |
762 | 762 | } |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | { |
720 | 720 | $this->_multiView = new TMultiView; |
721 | 721 | $this->_multiView->setID('WizardMultiView'); |
722 | - $this->_multiView->attachEventHandler('OnActiveViewChanged', [$this,'onActiveStepChanged']); |
|
722 | + $this->_multiView->attachEventHandler('OnActiveViewChanged', [$this, 'onActiveStepChanged']); |
|
723 | 723 | $this->_multiView->ignoreBubbleEvents(); |
724 | 724 | } |
725 | 725 | return $this->_multiView; |
@@ -1097,8 +1097,8 @@ discard block |
||
1097 | 1097 | |
1098 | 1098 | if(($this->_sideBarDataList = $this->_sideBar->findControl(self::ID_SIDEBAR_LIST)) !== null) |
1099 | 1099 | { |
1100 | - $this->_sideBarDataList->attachEventHandler('OnItemCommand', [$this,'dataListItemCommand']); |
|
1101 | - $this->_sideBarDataList->attachEventHandler('OnItemDataBound', [$this,'dataListItemDataBound']); |
|
1100 | + $this->_sideBarDataList->attachEventHandler('OnItemCommand', [$this, 'dataListItemCommand']); |
|
1101 | + $this->_sideBarDataList->attachEventHandler('OnItemDataBound', [$this, 'dataListItemDataBound']); |
|
1102 | 1102 | $this->_sideBarDataList->setDataSource($this->getWizardSteps()); |
1103 | 1103 | $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex()); |
1104 | 1104 | $this->_sideBarDataList->dataBind(); |
@@ -1388,16 +1388,16 @@ discard block |
||
1388 | 1388 | if($this->_cancelNavigation) // may be set in onSideBarButtonClick |
1389 | 1389 | $navParam->setCancelNavigation(true); |
1390 | 1390 | $requestedStep = $param->getCommandParameter(); |
1391 | - if (!is_numeric($requestedStep)) |
|
1391 | + if(!is_numeric($requestedStep)) |
|
1392 | 1392 | { |
1393 | 1393 | $requestedIndex = -1; |
1394 | - foreach ($this->getWizardSteps() as $index => $step) |
|
1395 | - if ($step->getId() === $requestedStep) |
|
1394 | + foreach($this->getWizardSteps() as $index => $step) |
|
1395 | + if($step->getId() === $requestedStep) |
|
1396 | 1396 | { |
1397 | 1397 | $requestedIndex = $index; |
1398 | 1398 | break; |
1399 | 1399 | } |
1400 | - if ($requestedIndex < 0) |
|
1400 | + if($requestedIndex < 0) |
|
1401 | 1401 | throw new TConfigurationException('wizard_step_invalid'); |
1402 | 1402 | } |
1403 | 1403 | else |
@@ -1414,7 +1414,7 @@ discard block |
||
1414 | 1414 | if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($nextStepIndex)) |
1415 | 1415 | { |
1416 | 1416 | if($movePrev) |
1417 | - $this->getPreviousStepIndex(true); // pop out the previous move from history |
|
1417 | + $this->getPreviousStepIndex(true); // pop out the previous move from history |
|
1418 | 1418 | $this->setActiveStepIndex($nextStepIndex); |
1419 | 1419 | } |
1420 | 1420 | } |
@@ -807,8 +807,7 @@ discard block |
||
807 | 807 | $this->_navigation->renderControl($writer); |
808 | 808 | $writer->write("\n</td></tr></table>\n"); |
809 | 809 | $this->renderEndTag($writer); |
810 | - } |
|
811 | - else |
|
810 | + } else |
|
812 | 811 | { |
813 | 812 | $this->applyControlProperties(); |
814 | 813 | $this->renderBeginTag($writer); |
@@ -906,8 +905,7 @@ discard block |
||
906 | 905 | { |
907 | 906 | $container->setVisible(true); |
908 | 907 | $showStandard = false; |
909 | - } |
|
910 | - else |
|
908 | + } else |
|
911 | 909 | $container->setVisible(false); |
912 | 910 | } |
913 | 911 | } |
@@ -1032,11 +1030,9 @@ discard block |
||
1032 | 1030 | return TWizardStepType::Finish; |
1033 | 1031 | else |
1034 | 1032 | return TWizardStepType::Step; |
1035 | - } |
|
1036 | - else |
|
1033 | + } else |
|
1037 | 1034 | return $type; |
1038 | - } |
|
1039 | - else |
|
1035 | + } else |
|
1040 | 1036 | return $type; |
1041 | 1037 | } |
1042 | 1038 | |
@@ -1103,8 +1099,7 @@ discard block |
||
1103 | 1099 | $this->_sideBarDataList->setSelectedItemIndex($this->getActiveStepIndex()); |
1104 | 1100 | $this->_sideBarDataList->dataBind(); |
1105 | 1101 | } |
1106 | - } |
|
1107 | - else |
|
1102 | + } else |
|
1108 | 1103 | { |
1109 | 1104 | $this->_sideBar = new TPanel; |
1110 | 1105 | $this->getControls()->add($this->_sideBar); |
@@ -1141,8 +1136,7 @@ discard block |
||
1141 | 1136 | { |
1142 | 1137 | if(!$this->_activeStepIndexSet && $this->allowNavigationToStep($newStepIndex)) |
1143 | 1138 | $this->setActiveStepIndex($newStepIndex); |
1144 | - } |
|
1145 | - else |
|
1139 | + } else |
|
1146 | 1140 | $this->setActiveStepIndex($stepIndex); |
1147 | 1141 | } |
1148 | 1142 | } |
@@ -1286,8 +1280,7 @@ discard block |
||
1286 | 1280 | $previousStepIndex = $history->pop(); |
1287 | 1281 | if($activeStepIndex === $previousStepIndex && $history->getCount() > 0) |
1288 | 1282 | $previousStepIndex = $history->pop(); |
1289 | - } |
|
1290 | - else |
|
1283 | + } else |
|
1291 | 1284 | { |
1292 | 1285 | $previousStepIndex = $history->peek(); |
1293 | 1286 | if($activeStepIndex === $previousStepIndex && $history->getCount() > 1) |
@@ -1298,8 +1291,7 @@ discard block |
||
1298 | 1291 | } |
1299 | 1292 | } |
1300 | 1293 | return $activeStepIndex === $previousStepIndex ? -1 : $previousStepIndex; |
1301 | - } |
|
1302 | - else |
|
1294 | + } else |
|
1303 | 1295 | return -1; |
1304 | 1296 | } |
1305 | 1297 | |
@@ -1363,8 +1355,7 @@ discard block |
||
1363 | 1355 | $navParam->setNextStepIndex($index + 1); |
1364 | 1356 | $this->onNextButtonClick($navParam); |
1365 | 1357 | $handled = true; |
1366 | - } |
|
1367 | - elseif(strcasecmp($command, self::CMD_PREVIOUS) === 0) |
|
1358 | + } elseif(strcasecmp($command, self::CMD_PREVIOUS) === 0) |
|
1368 | 1359 | { |
1369 | 1360 | if($type !== TWizardStepType::Finish && $type !== TWizardStepType::Step) |
1370 | 1361 | throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_PREVIOUS); |
@@ -1373,8 +1364,7 @@ discard block |
||
1373 | 1364 | $navParam->setNextStepIndex($prevIndex); |
1374 | 1365 | $this->onPreviousButtonClick($navParam); |
1375 | 1366 | $handled = true; |
1376 | - } |
|
1377 | - elseif(strcasecmp($command, self::CMD_COMPLETE) === 0) |
|
1367 | + } elseif(strcasecmp($command, self::CMD_COMPLETE) === 0) |
|
1378 | 1368 | { |
1379 | 1369 | if($type !== TWizardStepType::Finish) |
1380 | 1370 | throw new TInvalidDataValueException('wizard_command_invalid', self::CMD_COMPLETE); |
@@ -1382,8 +1372,7 @@ discard block |
||
1382 | 1372 | $navParam->setNextStepIndex($index + 1); |
1383 | 1373 | $this->onCompleteButtonClick($navParam); |
1384 | 1374 | $handled = true; |
1385 | - } |
|
1386 | - elseif(strcasecmp($command, self::CMD_MOVETO) === 0) |
|
1375 | + } elseif(strcasecmp($command, self::CMD_MOVETO) === 0) |
|
1387 | 1376 | { |
1388 | 1377 | if($this->_cancelNavigation) // may be set in onSideBarButtonClick |
1389 | 1378 | $navParam->setCancelNavigation(true); |
@@ -1391,16 +1380,16 @@ discard block |
||
1391 | 1380 | if (!is_numeric($requestedStep)) |
1392 | 1381 | { |
1393 | 1382 | $requestedIndex = -1; |
1394 | - foreach ($this->getWizardSteps() as $index => $step) |
|
1395 | - if ($step->getId() === $requestedStep) |
|
1383 | + foreach ($this->getWizardSteps() as $index => $step) { |
|
1384 | + if ($step->getId() === $requestedStep) |
|
1396 | 1385 | { |
1397 | 1386 | $requestedIndex = $index; |
1387 | + } |
|
1398 | 1388 | break; |
1399 | 1389 | } |
1400 | 1390 | if ($requestedIndex < 0) |
1401 | 1391 | throw new TConfigurationException('wizard_step_invalid'); |
1402 | - } |
|
1403 | - else |
|
1392 | + } else |
|
1404 | 1393 | $requestedIndex = TPropertyValue::ensureInteger($requestedStep); |
1405 | 1394 | $navParam->setNextStepIndex($requestedIndex); |
1406 | 1395 | $handled = true; |
@@ -1417,8 +1406,7 @@ discard block |
||
1417 | 1406 | $this->getPreviousStepIndex(true); // pop out the previous move from history |
1418 | 1407 | $this->setActiveStepIndex($nextStepIndex); |
1419 | 1408 | } |
1420 | - } |
|
1421 | - else |
|
1409 | + } else |
|
1422 | 1410 | $this->setActiveStepIndex($index); |
1423 | 1411 | return true; |
1424 | 1412 | } |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | protected function _getZappableSleepProps(&$exprops) |
77 | 77 | { |
78 | 78 | parent::_getZappableSleepProps($exprops); |
79 | - if ($this->_attributes === null) |
|
79 | + if($this->_attributes === null) |
|
80 | 80 | $exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_attributes"; |
81 | 81 | if($this->_text === '') |
82 | 82 | $exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_text"; |
83 | 83 | if($this->_value === '') |
84 | 84 | $exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_value"; |
85 | - if ($this->_enabled === true) |
|
85 | + if($this->_enabled === true) |
|
86 | 86 | $exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_enabled"; |
87 | - if ($this->_selected === false) |
|
87 | + if($this->_selected === false) |
|
88 | 88 | $exprops[] = "\0Prado\Web\UI\WebControls\TListItem\0_selected"; |
89 | 89 | } |
90 | 90 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function getText() |
127 | 127 | { |
128 | - return $this->_text === ''?$this->_value:$this->_text; |
|
128 | + return $this->_text === '' ? $this->_value : $this->_text; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function getValue() |
143 | 143 | { |
144 | - return $this->_value === ''?$this->_text:$this->_value; |
|
144 | + return $this->_value === '' ? $this->_text : $this->_value; |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function hasAttribute($name) |
178 | 178 | { |
179 | - return $this->_attributes?$this->_attributes->contains($name):false; |
|
179 | + return $this->_attributes ? $this->_attributes->contains($name) : false; |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function getAttribute($name) |
186 | 186 | { |
187 | - return $this->_attributes?$this->_attributes->itemAt($name):null; |
|
187 | + return $this->_attributes ? $this->_attributes->itemAt($name) : null; |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | /** |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function removeAttribute($name) |
205 | 205 | { |
206 | - return $this->_attributes?$this->_attributes->remove($name):null; |
|
206 | + return $this->_attributes ? $this->_attributes->remove($name) : null; |
|
207 | 207 | } |
208 | 208 | } |
209 | 209 |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | // render items |
189 | 189 | $hasSeparators = $user->getHasSeparators(); |
190 | 190 | $itemCount = $user->getItemCount(); |
191 | - for($i = 0;$i < $itemCount;++$i) |
|
191 | + for($i = 0; $i < $itemCount; ++$i) |
|
192 | 192 | { |
193 | 193 | $user->renderItem($writer, $this, 'Item', $i); |
194 | 194 | if($hasSeparators && $i != $itemCount - 1) |
@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | $tableLayout = ($this->_repeatLayout === TRepeatLayout::Table); |
209 | 209 | $hasSeparators = $user->getHasSeparators(); |
210 | 210 | $itemCount = $user->getItemCount(); |
211 | - $columns = $this->_repeatColumns === 0?$itemCount:$this->_repeatColumns; |
|
212 | - $totalColumns = $hasSeparators?$columns + $columns:$columns; |
|
211 | + $columns = $this->_repeatColumns === 0 ? $itemCount : $this->_repeatColumns; |
|
212 | + $totalColumns = $hasSeparators ? $columns + $columns : $columns; |
|
213 | 213 | $needBreak = $columns < $itemCount; |
214 | 214 | |
215 | 215 | if($user->getHasHeader()) |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | { |
221 | 221 | $writer->renderBeginTag('tbody'); |
222 | 222 | $column = 0; |
223 | - for($i = 0;$i < $itemCount;++$i) |
|
223 | + for($i = 0; $i < $itemCount; ++$i) |
|
224 | 224 | { |
225 | 225 | if($column == 0) |
226 | 226 | $writer->renderBeginTag('tr'); |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | { |
245 | 245 | $restColumns = $columns - $column; |
246 | 246 | if($hasSeparators) |
247 | - $restColumns = $restColumns?$restColumns + $restColumns + 1:1; |
|
248 | - for($j = 0;$j < $restColumns;++$j) |
|
247 | + $restColumns = $restColumns ? $restColumns + $restColumns + 1 : 1; |
|
248 | + for($j = 0; $j < $restColumns; ++$j) |
|
249 | 249 | $writer->write("<td></td>\n"); |
250 | 250 | } |
251 | 251 | if($column == $columns || $i == $itemCount - 1) |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | else |
261 | 261 | { |
262 | 262 | $column = 0; |
263 | - for($i = 0;$i < $itemCount;++$i) |
|
263 | + for($i = 0; $i < $itemCount; ++$i) |
|
264 | 264 | { |
265 | 265 | $user->renderItem($writer, $this, 'Item', $i); |
266 | 266 | if($hasSeparators && $i != $itemCount - 1) |
@@ -299,13 +299,13 @@ discard block |
||
299 | 299 | else |
300 | 300 | { |
301 | 301 | $columns = $this->_repeatColumns; |
302 | - $rows = (int)(($itemCount + $columns - 1) / $columns); |
|
302 | + $rows = (int) (($itemCount + $columns - 1) / $columns); |
|
303 | 303 | if($rows == 0 && $itemCount > 0) |
304 | 304 | $rows = 1; |
305 | 305 | if(($lastColumns = $itemCount % $columns) == 0) |
306 | 306 | $lastColumns = $columns; |
307 | 307 | } |
308 | - $totalColumns = $hasSeparators?$columns + $columns:$columns; |
|
308 | + $totalColumns = $hasSeparators ? $columns + $columns : $columns; |
|
309 | 309 | |
310 | 310 | if($user->getHasHeader()) |
311 | 311 | $this->renderHeader($writer, $user, $tableLayout, $totalColumns, false); |
@@ -314,11 +314,11 @@ discard block |
||
314 | 314 | { |
315 | 315 | $writer->renderBeginTag('tbody'); |
316 | 316 | $renderedItems = 0; |
317 | - for($row = 0;$row < $rows;++$row) |
|
317 | + for($row = 0; $row < $rows; ++$row) |
|
318 | 318 | { |
319 | 319 | $index = $row; |
320 | 320 | $writer->renderBeginTag('tr'); |
321 | - for($col = 0;$col < $columns;++$col) |
|
321 | + for($col = 0; $col < $columns; ++$col) |
|
322 | 322 | { |
323 | 323 | if($renderedItems >= $itemCount) |
324 | 324 | break; |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $restColumns = $columns - $lastColumns; |
362 | 362 | if($hasSeparators) |
363 | 363 | $restColumns += $restColumns; |
364 | - for($col = 0;$col < $restColumns;++$col) |
|
364 | + for($col = 0; $col < $restColumns; ++$col) |
|
365 | 365 | $writer->write("<td></td>\n"); |
366 | 366 | } |
367 | 367 | $writer->renderEndTag(); |
@@ -372,10 +372,10 @@ discard block |
||
372 | 372 | else |
373 | 373 | { |
374 | 374 | $renderedItems = 0; |
375 | - for($row = 0;$row < $rows;++$row) |
|
375 | + for($row = 0; $row < $rows; ++$row) |
|
376 | 376 | { |
377 | 377 | $index = $row; |
378 | - for($col = 0;$col < $columns;++$col) |
|
378 | + for($col = 0; $col < $columns; ++$col) |
|
379 | 379 | { |
380 | 380 | if($renderedItems >= $itemCount) |
381 | 381 | break; |
@@ -152,13 +152,11 @@ discard block |
||
152 | 152 | $control->setCaption($this->_caption); |
153 | 153 | $control->setCaptionAlign($this->_captionAlign); |
154 | 154 | } |
155 | - } |
|
156 | - elseif($this->_repeatLayout === TRepeatLayout::Raw) |
|
155 | + } elseif($this->_repeatLayout === TRepeatLayout::Raw) |
|
157 | 156 | { |
158 | 157 | $this->renderRawContents($writer, $user); |
159 | 158 | return; |
160 | - } |
|
161 | - else |
|
159 | + } else |
|
162 | 160 | $control = new TWebControl; |
163 | 161 | $control->setID($user->getClientID()); |
164 | 162 | $control->copyBaseAttributes($user); |
@@ -245,8 +243,9 @@ discard block |
||
245 | 243 | $restColumns = $columns - $column; |
246 | 244 | if($hasSeparators) |
247 | 245 | $restColumns = $restColumns?$restColumns + $restColumns + 1:1; |
248 | - for($j = 0;$j < $restColumns;++$j) |
|
249 | - $writer->write("<td></td>\n"); |
|
246 | + for($j = 0;$j < $restColumns;++$j) { |
|
247 | + $writer->write("<td></td>\n"); |
|
248 | + } |
|
250 | 249 | } |
251 | 250 | if($column == $columns || $i == $itemCount - 1) |
252 | 251 | { |
@@ -256,8 +255,7 @@ discard block |
||
256 | 255 | } |
257 | 256 | } |
258 | 257 | $writer->renderEndTag(); |
259 | - } |
|
260 | - else |
|
258 | + } else |
|
261 | 259 | { |
262 | 260 | $column = 0; |
263 | 261 | for($i = 0;$i < $itemCount;++$i) |
@@ -295,8 +293,7 @@ discard block |
||
295 | 293 | $rows = $itemCount; |
296 | 294 | $columns = 1; |
297 | 295 | $lastColumns = 1; |
298 | - } |
|
299 | - else |
|
296 | + } else |
|
300 | 297 | { |
301 | 298 | $columns = $this->_repeatColumns; |
302 | 299 | $rows = (int)(($itemCount + $columns - 1) / $columns); |
@@ -352,8 +349,7 @@ discard block |
||
352 | 349 | $user->renderItem($writer, $this, 'Separator', $index); |
353 | 350 | $writer->renderEndTag(); |
354 | 351 | $writer->writeLine(); |
355 | - } |
|
356 | - elseif($columns > 1) |
|
352 | + } elseif($columns > 1) |
|
357 | 353 | $writer->write("<td></td>\n"); |
358 | 354 | } |
359 | 355 | if($row == $rows - 1) |
@@ -361,15 +357,15 @@ discard block |
||
361 | 357 | $restColumns = $columns - $lastColumns; |
362 | 358 | if($hasSeparators) |
363 | 359 | $restColumns += $restColumns; |
364 | - for($col = 0;$col < $restColumns;++$col) |
|
365 | - $writer->write("<td></td>\n"); |
|
360 | + for($col = 0;$col < $restColumns;++$col) { |
|
361 | + $writer->write("<td></td>\n"); |
|
362 | + } |
|
366 | 363 | } |
367 | 364 | $writer->renderEndTag(); |
368 | 365 | $writer->writeLine(); |
369 | 366 | } |
370 | 367 | $writer->renderEndTag(); |
371 | - } |
|
372 | - else |
|
368 | + } else |
|
373 | 369 | { |
374 | 370 | $renderedItems = 0; |
375 | 371 | for($row = 0;$row < $rows;++$row) |
@@ -434,8 +430,7 @@ discard block |
||
434 | 430 | $writer->renderEndTag(); |
435 | 431 | $writer->renderEndTag(); |
436 | 432 | $writer->renderEndTag(); |
437 | - } |
|
438 | - else |
|
433 | + } else |
|
439 | 434 | { |
440 | 435 | $user->renderItem($writer, $this, 'Header', -1); |
441 | 436 | if($needBreak) |
@@ -466,8 +461,7 @@ discard block |
||
466 | 461 | $writer->renderEndTag(); |
467 | 462 | $writer->renderEndTag(); |
468 | 463 | $writer->renderEndTag(); |
469 | - } |
|
470 | - else |
|
464 | + } else |
|
471 | 465 | $user->renderItem($writer, $this, 'Footer', -1); |
472 | 466 | $writer->writeLine(); |
473 | 467 | } |
@@ -150,15 +150,13 @@ discard block |
||
150 | 150 | $activeView = $views->itemAt($index); |
151 | 151 | else |
152 | 152 | throw new TInvalidDataValueException('accordion_activeviewid_invalid', $id); |
153 | - } |
|
154 | - elseif(($index = $this->getActiveViewIndex()) >= 0) |
|
153 | + } elseif(($index = $this->getActiveViewIndex()) >= 0) |
|
155 | 154 | { |
156 | 155 | if($index < $views->getCount()) |
157 | 156 | $activeView = $views->itemAt($index); |
158 | 157 | else |
159 | 158 | throw new TInvalidDataValueException('accordion_activeviewindex_invalid', $index); |
160 | - } |
|
161 | - else |
|
159 | + } else |
|
162 | 160 | { |
163 | 161 | foreach($views as $index => $view) |
164 | 162 | { |
@@ -349,8 +347,7 @@ discard block |
||
349 | 347 | $this->setActiveViewIndex($index); |
350 | 348 | $this->setActiveViewID($view->getID(false)); |
351 | 349 | $view->setActive(true); |
352 | - } |
|
353 | - else |
|
350 | + } else |
|
354 | 351 | $v->setActive(false); |
355 | 352 | } |
356 | 353 | } |
@@ -490,8 +487,9 @@ discard block |
||
490 | 487 | if (($viewheight = $this->getViewHeight()) > 0) |
491 | 488 | $options['maxHeight'] = $viewheight; |
492 | 489 | $views = []; |
493 | - foreach($this->getViews() as $view) |
|
494 | - $views[$view->getClientID()] = $view->getVisible() ? '1': '0'; |
|
490 | + foreach($this->getViews() as $view) { |
|
491 | + $views[$view->getClientID()] = $view->getVisible() ? '1': '0'; |
|
492 | + } |
|
495 | 493 | $options['Views'] = $views; |
496 | 494 | |
497 | 495 | return $options; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | public function getCssClass() |
209 | 209 | { |
210 | 210 | $cssClass = parent::getCssClass(); |
211 | - return $cssClass === ''?'accordion':$cssClass; |
|
211 | + return $cssClass === '' ? 'accordion' : $cssClass; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | { |
367 | 367 | if(($index = $values[$this->getClientID() . '_1']) !== null) |
368 | 368 | { |
369 | - $index = (int)$index; |
|
369 | + $index = (int) $index; |
|
370 | 370 | $currentIndex = $this->getActiveViewIndex(); |
371 | 371 | if($currentIndex !== $index) |
372 | 372 | { |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | public function onPreRender($param) |
420 | 420 | { |
421 | 421 | parent::onPreRender($param); |
422 | - $this->getActiveView(); // determine the active view |
|
422 | + $this->getActiveView(); // determine the active view |
|
423 | 423 | $this->registerStyleSheet(); |
424 | 424 | } |
425 | 425 | |
@@ -487,11 +487,11 @@ discard block |
||
487 | 487 | $options['HeaderCssClass'] = $this->getHeaderCssClass(); |
488 | 488 | $options['Duration'] = $this->getAnimationDuration(); |
489 | 489 | |
490 | - if (($viewheight = $this->getViewHeight()) > 0) |
|
490 | + if(($viewheight = $this->getViewHeight()) > 0) |
|
491 | 491 | $options['maxHeight'] = $viewheight; |
492 | 492 | $views = []; |
493 | 493 | foreach($this->getViews() as $view) |
494 | - $views[$view->getClientID()] = $view->getVisible() ? '1': '0'; |
|
494 | + $views[$view->getClientID()] = $view->getVisible() ? '1' : '0'; |
|
495 | 495 | $options['Views'] = $views; |
496 | 496 | |
497 | 497 | return $options; |
@@ -77,7 +77,7 @@ |
||
77 | 77 | //$writer->write('<!-- flush -->'); |
78 | 78 | // ajax responses can't be parsed by the client side before loaded and returned completely, |
79 | 79 | // so don't bother with flushing output somewhere mid-page if refreshing in a callback |
80 | - if (!$this->Page->IsCallback) |
|
80 | + if(!$this->Page->IsCallback) |
|
81 | 81 | { |
82 | 82 | $this->Page->flushWriter(); |
83 | 83 | // $this->Application->flushOutput($this->ContinueBuffering); |
@@ -163,7 +163,7 @@ |
||
163 | 163 | $writer->addAttribute('scheme', $this->_scheme); |
164 | 164 | if($this->_charset !== '') |
165 | 165 | $writer->addAttribute('charset', $this->_charset); |
166 | - if ($this->_charset === '') |
|
166 | + if($this->_charset === '') |
|
167 | 167 | $writer->addAttribute('content', $this->_content); |
168 | 168 | $writer->renderBeginTag('meta'); |
169 | 169 | $writer->renderEndTag(); |
@@ -54,15 +54,15 @@ discard block |
||
54 | 54 | protected function _getZappableSleepProps(&$exprops) |
55 | 55 | { |
56 | 56 | parent::_getZappableSleepProps($exprops); |
57 | - if ($this->_fields === []) |
|
57 | + if($this->_fields === []) |
|
58 | 58 | $exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_fields"; |
59 | 59 | if($this->_font === null) |
60 | 60 | $exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_font"; |
61 | 61 | if($this->_class === null) |
62 | 62 | $exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_class"; |
63 | - if ($this->_customStyle === null) |
|
63 | + if($this->_customStyle === null) |
|
64 | 64 | $exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_customStyle"; |
65 | - if ($this->_displayStyle === 'Fixed') |
|
65 | + if($this->_displayStyle === 'Fixed') |
|
66 | 66 | $exprops[] = "\0Prado\Web\UI\WebControls\TStyle\0_displayStyle"; |
67 | 67 | } |
68 | 68 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function getBackColor() |
93 | 93 | { |
94 | - return isset($this->_fields['background-color'])?$this->_fields['background-color']:''; |
|
94 | + return isset($this->_fields['background-color']) ? $this->_fields['background-color'] : ''; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function getBorderColor() |
112 | 112 | { |
113 | - return isset($this->_fields['border-color'])?$this->_fields['border-color']:''; |
|
113 | + return isset($this->_fields['border-color']) ? $this->_fields['border-color'] : ''; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function getBorderStyle() |
131 | 131 | { |
132 | - return isset($this->_fields['border-style'])?$this->_fields['border-style']:''; |
|
132 | + return isset($this->_fields['border-style']) ? $this->_fields['border-style'] : ''; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function getBorderWidth() |
151 | 151 | { |
152 | - return isset($this->_fields['border-width'])?$this->_fields['border-width']:''; |
|
152 | + return isset($this->_fields['border-width']) ? $this->_fields['border-width'] : ''; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function getCssClass() |
170 | 170 | { |
171 | - return $this->_class === null?'':$this->_class; |
|
171 | + return $this->_class === null ? '' : $this->_class; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | */ |
242 | 242 | public function getForeColor() |
243 | 243 | { |
244 | - return isset($this->_fields['color'])?$this->_fields['color']:''; |
|
244 | + return isset($this->_fields['color']) ? $this->_fields['color'] : ''; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | /** |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | */ |
261 | 261 | public function getHeight() |
262 | 262 | { |
263 | - return isset($this->_fields['height'])?$this->_fields['height']:''; |
|
263 | + return isset($this->_fields['height']) ? $this->_fields['height'] : ''; |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | /** |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | public function getCustomStyle() |
281 | 281 | { |
282 | - return $this->_customStyle === null?'':$this->_customStyle; |
|
282 | + return $this->_customStyle === null ? '' : $this->_customStyle; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function getStyleField($name) |
299 | 299 | { |
300 | - return isset($this->_fields[$name])?$this->_fields[$name]:''; |
|
300 | + return isset($this->_fields[$name]) ? $this->_fields[$name] : ''; |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | */ |
334 | 334 | public function getWidth() |
335 | 335 | { |
336 | - return isset($this->_fields['width'])?$this->_fields['width']:''; |
|
336 | + return isset($this->_fields['width']) ? $this->_fields['width'] : ''; |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | /** |