@@ -141,8 +141,7 @@ discard block |
||
| 141 | 141 | $button->setText($text); |
| 142 | 142 | return $button; |
| 143 | 143 | } |
| 144 | - } |
|
| 145 | - else { |
|
| 144 | + } else { |
|
| 146 | 145 | $button = new TActiveButton; |
| 147 | 146 | if(!$enabled) |
| 148 | 147 | $button->setEnabled(false); |
@@ -176,8 +175,7 @@ discard block |
||
| 176 | 175 | if($this->getHasPreRendered()) { |
| 177 | 176 | $this->renderDataGrid($writer); |
| 178 | 177 | if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(), $writer); |
| 179 | - } |
|
| 180 | - else { |
|
| 178 | + } else { |
|
| 181 | 179 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
| 182 | 180 | } |
| 183 | 181 | } |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | { |
| 67 | 67 | return ($this->_new !== null) && $this->_new->hasCssClass() |
| 68 | 68 | ? $this->_new->getCssClass() : null; |
| 69 | - } |
|
| 70 | - else |
|
| 69 | + } else |
|
| 71 | 70 | { |
| 72 | 71 | return $this->_old->getCssClass() !== $this->_new->getCssClass() ? |
| 73 | 72 | $this->_new->getCssClass() : null; |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | $control->setData($text); |
| 50 | 50 | } |
| 51 | 51 | $cell->getControls()->add($control); |
| 52 | - } |
|
| 53 | - elseif($this->getAllowSorting()) { |
|
| 52 | + } elseif($this->getAllowSorting()) { |
|
| 54 | 53 | $sortExpression = $this->getSortExpression(); |
| 55 | 54 | if(($url = $this->getHeaderImageUrl()) !== '') { |
| 56 | 55 | $button = new TActiveImageButton; |
@@ -61,27 +60,23 @@ discard block |
||
| 61 | 60 | $button->setAlternateText($text); |
| 62 | 61 | $button->setCausesValidation(false); |
| 63 | 62 | $cell->getControls()->add($button); |
| 64 | - } |
|
| 65 | - elseif($text !== '') { |
|
| 63 | + } elseif($text !== '') { |
|
| 66 | 64 | $button = new TActiveLinkButton; |
| 67 | 65 | $button->setText($text); |
| 68 | 66 | $button->setCommandName(TDataGrid::CMD_SORT); |
| 69 | 67 | $button->setCommandParameter($sortExpression); |
| 70 | 68 | $button->setCausesValidation(false); |
| 71 | 69 | $cell->getControls()->add($button); |
| 72 | - } |
|
| 73 | - else |
|
| 70 | + } else |
|
| 74 | 71 | $cell->setText(' '); |
| 75 | - } |
|
| 76 | - else { |
|
| 72 | + } else { |
|
| 77 | 73 | if(($url = $this->getHeaderImageUrl()) !== '') { |
| 78 | 74 | $image = new TActiveImage; |
| 79 | 75 | $image->setImageUrl($url); |
| 80 | 76 | if($text !== '') |
| 81 | 77 | $image->setAlternateText($text); |
| 82 | 78 | $cell->getControls()->add($image); |
| 83 | - } |
|
| 84 | - elseif($text !== '') |
|
| 79 | + } elseif($text !== '') |
|
| 85 | 80 | $cell->setText($text); |
| 86 | 81 | else |
| 87 | 82 | $cell->setText(' '); |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | $cell->registerObject('CheckBox', $checkBox); |
| 56 | 56 | if($this->getDataField() !== '') |
| 57 | 57 | $checkBox->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
| 58 | - } |
|
| 59 | - else |
|
| 58 | + } else |
|
| 60 | 59 | parent::initializeCell($cell, $columnIndex, $itemType); |
| 61 | 60 | } |
| 62 | 61 | |
@@ -78,8 +77,7 @@ discard block |
||
| 78 | 77 | $control->setData($text); |
| 79 | 78 | } |
| 80 | 79 | $cell->getControls()->add($control); |
| 81 | - } |
|
| 82 | - elseif($this->getAllowSorting()) |
|
| 80 | + } elseif($this->getAllowSorting()) |
|
| 83 | 81 | { |
| 84 | 82 | $sortExpression = $this->getSortExpression(); |
| 85 | 83 | if(($url = $this->getHeaderImageUrl()) !== '') |
@@ -92,8 +90,7 @@ discard block |
||
| 92 | 90 | $button->setAlternateText($text); |
| 93 | 91 | $button->setCausesValidation(false); |
| 94 | 92 | $cell->getControls()->add($button); |
| 95 | - } |
|
| 96 | - elseif($text !== '') |
|
| 93 | + } elseif($text !== '') |
|
| 97 | 94 | { |
| 98 | 95 | $button = new TActiveLinkButton; |
| 99 | 96 | $button->setText($text); |
@@ -101,11 +98,9 @@ discard block |
||
| 101 | 98 | $button->setCommandParameter($sortExpression); |
| 102 | 99 | $button->setCausesValidation(false); |
| 103 | 100 | $cell->getControls()->add($button); |
| 104 | - } |
|
| 105 | - else |
|
| 101 | + } else |
|
| 106 | 102 | $cell->setText(' '); |
| 107 | - } |
|
| 108 | - else |
|
| 103 | + } else |
|
| 109 | 104 | { |
| 110 | 105 | if(($url = $this->getHeaderImageUrl()) !== '') |
| 111 | 106 | { |
@@ -114,8 +109,7 @@ discard block |
||
| 114 | 109 | if($text !== '') |
| 115 | 110 | $image->setAlternateText($text); |
| 116 | 111 | $cell->getControls()->add($image); |
| 117 | - } |
|
| 118 | - elseif($text !== '') |
|
| 112 | + } elseif($text !== '') |
|
| 119 | 113 | $cell->setText($text); |
| 120 | 114 | else |
| 121 | 115 | $cell->setText(' '); |
@@ -48,8 +48,7 @@ discard block |
||
| 48 | 48 | $control->setData($text); |
| 49 | 49 | } |
| 50 | 50 | $cell->getControls()->add($control); |
| 51 | - } |
|
| 52 | - elseif($this->getAllowSorting()) { |
|
| 51 | + } elseif($this->getAllowSorting()) { |
|
| 53 | 52 | $sortExpression = $this->getSortExpression(); |
| 54 | 53 | if(($url = $this->getHeaderImageUrl()) !== '') { |
| 55 | 54 | $button = new TActiveImageButton; |
@@ -62,19 +61,16 @@ discard block |
||
| 62 | 61 | } |
| 63 | 62 | $button->setCausesValidation(false); |
| 64 | 63 | $cell->getControls()->add($button); |
| 65 | - } |
|
| 66 | - elseif($text !== '') { |
|
| 64 | + } elseif($text !== '') { |
|
| 67 | 65 | $button = new TActiveLinkButton; |
| 68 | 66 | $button->setText($text); |
| 69 | 67 | $button->setCommandName(TDataGrid::CMD_SORT); |
| 70 | 68 | $button->setCommandParameter($sortExpression); |
| 71 | 69 | $button->setCausesValidation(false); |
| 72 | 70 | $cell->getControls()->add($button); |
| 73 | - } |
|
| 74 | - else |
|
| 71 | + } else |
|
| 75 | 72 | $cell->setText(' '); |
| 76 | - } |
|
| 77 | - else { |
|
| 73 | + } else { |
|
| 78 | 74 | if(($url = $this->getHeaderImageUrl()) !== '') { |
| 79 | 75 | $image = new TActiveImage; |
| 80 | 76 | $image->setImageUrl($url); |
@@ -83,8 +79,7 @@ discard block |
||
| 83 | 79 | $image->setToolTip($text); |
| 84 | 80 | } |
| 85 | 81 | $cell->getControls()->add($image); |
| 86 | - } |
|
| 87 | - elseif($text !== '') |
|
| 82 | + } elseif($text !== '') |
|
| 88 | 83 | $cell->setText($text); |
| 89 | 84 | else |
| 90 | 85 | $cell->setText(' '); |
@@ -71,8 +71,7 @@ |
||
| 71 | 71 | $value = str_ireplace(["\r\n", "\n"], "", $value); |
| 72 | 72 | $command = "tinymce.get('{$this->getClientID()}').setContent('{$value}')"; |
| 73 | 73 | $this->getPage()->getCallbackClient()->evaluateScript($command); |
| 74 | - } |
|
| 75 | - else |
|
| 74 | + } else |
|
| 76 | 75 | $this->getPage()->getCallbackClient()->setValue($this, $value); |
| 77 | 76 | } |
| 78 | 77 | } |
@@ -30,8 +30,7 @@ |
||
| 30 | 30 | if($this->_old === null) |
| 31 | 31 | { |
| 32 | 32 | return ($this->_new !== null) ? $this->_new->toArray() : $this->_null; |
| 33 | - } |
|
| 34 | - else |
|
| 33 | + } else |
|
| 35 | 34 | { |
| 36 | 35 | $new = $this->_new->toArray(); |
| 37 | 36 | $old = $this->_old->toArray(); |
@@ -136,8 +136,7 @@ discard block |
||
| 136 | 136 | $button->setCssClass($this->getButtonCssClass()); |
| 137 | 137 | return $button; |
| 138 | 138 | } |
| 139 | - } |
|
| 140 | - elseif($buttonType === TPagerButtonType::ImageButton) |
|
| 139 | + } elseif($buttonType === TPagerButtonType::ImageButton) |
|
| 141 | 140 | { |
| 142 | 141 | $button = new TActiveImageButton; |
| 143 | 142 | $button->setImageUrl($this->getPageImageUrl($text, $commandName)); |
@@ -145,8 +144,7 @@ discard block |
||
| 145 | 144 | $button->Visible = true; |
| 146 | 145 | else |
| 147 | 146 | $button->Visible = false; |
| 148 | - } |
|
| 149 | - else |
|
| 147 | + } else |
|
| 150 | 148 | { |
| 151 | 149 | $button = new TActiveButton; |
| 152 | 150 | if(!$enabled) |
@@ -206,8 +204,7 @@ discard block |
||
| 206 | 204 | TWebControl::render($writer); |
| 207 | 205 | if($this->getActiveControl()->canUpdateClientSide()) |
| 208 | 206 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
| 209 | - } |
|
| 210 | - else |
|
| 207 | + } else |
|
| 211 | 208 | { |
| 212 | 209 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
| 213 | 210 | } |
@@ -116,8 +116,7 @@ discard block |
||
| 116 | 116 | $newid = substr($id, $pos + 1); |
| 117 | 117 | if ($control !== null) |
| 118 | 118 | $control = $control->$newid; |
| 119 | - } |
|
| 120 | - else |
|
| 119 | + } else |
|
| 121 | 120 | { |
| 122 | 121 | // TCheckBoxList overrides findControl() with a fake implementation |
| 123 | 122 | // but accepts a second parameter to use the standard one |
@@ -179,8 +178,7 @@ discard block |
||
| 179 | 178 | { |
| 180 | 179 | $group = $this->getValidationGroup(); |
| 181 | 180 | return $this->getPage()->getValidators($group)->getCount() > 0; |
| 182 | - } |
|
| 183 | - else |
|
| 181 | + } else |
|
| 184 | 182 | return false; |
| 185 | 183 | } |
| 186 | 184 | |