@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $list->dataBind(); |
| 108 | 108 | $list->setSelectedIndex($this->getCurrentPageIndex()); |
| 109 | 109 | $list->setAutoPostBack(true); |
| 110 | - $list->attachEventHandler('OnSelectedIndexChanged', [$this,'listIndexChanged']); |
|
| 110 | + $list->attachEventHandler('OnSelectedIndexChanged', [$this, 'listIndexChanged']); |
|
| 111 | 111 | $list->attachEventHandler('OnCallback', [$this, 'handleCallback']); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -179,14 +179,14 @@ discard block |
||
| 179 | 179 | * @param mixed $sender |
| 180 | 180 | * @param TCallbackEventParameter $param |
| 181 | 181 | */ |
| 182 | - public function handleCallback ($sender, $param) |
|
| 182 | + public function handleCallback($sender, $param) |
|
| 183 | 183 | { |
| 184 | 184 | // Update all the buttons pagers attached to the same control. |
| 185 | 185 | // Dropdown pagers doesn't need to be re-rendered. |
| 186 | 186 | $controlToPaginate = $this->getControlToPaginate(); |
| 187 | - foreach ($this->getNamingContainer()->findControlsByType('Prado\Web\UI\ActiveControls\TActivePager', false) as $control) |
|
| 187 | + foreach($this->getNamingContainer()->findControlsByType('Prado\Web\UI\ActiveControls\TActivePager', false) as $control) |
|
| 188 | 188 | { |
| 189 | - if ($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate() === $controlToPaginate) |
|
| 189 | + if($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate() === $controlToPaginate) |
|
| 190 | 190 | { |
| 191 | 191 | $control->render($param->getNewWriter()); |
| 192 | 192 | // FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting |
@@ -198,11 +198,11 @@ discard block |
||
| 198 | 198 | $this->onCallback($param); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - public function render ($writer) |
|
| 201 | + public function render($writer) |
|
| 202 | 202 | { |
| 203 | 203 | if($this->getHasPreRendered()) |
| 204 | 204 | { |
| 205 | - $this->setDisplay(($this->getPageCount() == 1)?TDisplayStyle::None:TDisplayStyle::Dynamic); |
|
| 205 | + $this->setDisplay(($this->getPageCount() == 1) ?TDisplayStyle::None : TDisplayStyle::Dynamic); |
|
| 206 | 206 | TWebControl::render($writer); |
| 207 | 207 | if($this->getActiveControl()->canUpdateClientSide()) |
| 208 | 208 | $this->getPage()->getCallbackClient()->replaceContent($this, $writer); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $button->setCausesValidation($this->getCausesValidation()); |
| 50 | 50 | $button->setValidationGroup($this->getValidationGroup()); |
| 51 | 51 | if($this->getDataTextField() !== '' || ($buttonType === TButtonColumnType::ImageButton && $this->getDataImageUrlField() !== '')) |
| 52 | - $button->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
|
| 52 | + $button->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']); |
|
| 53 | 53 | $cell->getControls()->add($button); |
| 54 | 54 | $cell->registerObject('Button', $button); |
| 55 | 55 | } |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | { |
| 115 | 115 | $control = $this->getControl()->getSubProperty(substr($id, 0, $pos)); |
| 116 | 116 | $newid = substr($id, $pos + 1); |
| 117 | - if ($control !== null) |
|
| 117 | + if($control !== null) |
|
| 118 | 118 | $control = $control->$newid; |
| 119 | 119 | } |
| 120 | 120 | else |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function evaluateDynamicContent() |
| 81 | 81 | { |
| 82 | - $context = $this->_container === null?$this:$this->_container; |
|
| 82 | + $context = $this->_container === null ? $this : $this->_container; |
|
| 83 | 83 | foreach($this->_expressions as $id => $expression) |
| 84 | 84 | $this->_items[$id] = $context->evaluateExpression($expression); |
| 85 | 85 | foreach($this->_statements as $id => $statement) |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function dataBind() |
| 94 | 94 | { |
| 95 | - $context = $this->_container === null?$this:$this->_container; |
|
| 95 | + $context = $this->_container === null ? $this : $this->_container; |
|
| 96 | 96 | foreach($this->_bindings as $id => $binding) |
| 97 | 97 | $this->_items[$id] = $context->evaluateExpression($binding); |
| 98 | 98 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $control = null; |
| 56 | 56 | $service = Prado::getApplication()->getService(); |
| 57 | - if ($service instanceof TPageService) |
|
| 57 | + if($service instanceof TPageService) |
|
| 58 | 58 | { |
| 59 | 59 | // Find the control |
| 60 | 60 | // Warning, this will not work if you have a '_' in your control Id ! |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | */ |
| 91 | 91 | public function getImageUrl() |
| 92 | 92 | { |
| 93 | - return $this->_imageUrl === null?'':$this->_imageUrl; |
|
| 93 | + return $this->_imageUrl === null ? '' : $this->_imageUrl; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public function getButtonText() |
| 108 | 108 | { |
| 109 | - return $this->_buttonText === null?'':$this->_buttonText; |
|
| 109 | + return $this->_buttonText === null ? '' : $this->_buttonText; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function getButtonType() |
| 124 | 124 | { |
| 125 | - return $this->_buttonType === null? TWizardNavigationButtonType::Button :$this->_buttonType; |
|
| 125 | + return $this->_buttonType === null ? TWizardNavigationButtonType::Button : $this->_buttonType; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
@@ -247,16 +247,16 @@ |
||
| 247 | 247 | elseif($scrollBars === TInlineFrameScrollBars::Both) |
| 248 | 248 | $writer->addAttribute('scrolling', 'yes'); |
| 249 | 249 | |
| 250 | - if (!$this->getShowBorder()) |
|
| 250 | + if(!$this->getShowBorder()) |
|
| 251 | 251 | $writer->addAttribute('frameborder', '0'); |
| 252 | 252 | |
| 253 | 253 | if(($longdesc = $this->getDescriptionUrl()) !== '') |
| 254 | 254 | $writer->addAttribute('longdesc', $longdesc); |
| 255 | 255 | |
| 256 | - if (($width = $this->getWidth()) !== -1) |
|
| 256 | + if(($width = $this->getWidth()) !== -1) |
|
| 257 | 257 | $writer->addAttribute('width', $width); |
| 258 | 258 | |
| 259 | - if (($height = $this->getHeight()) !== -1) |
|
| 259 | + if(($height = $this->getHeight()) !== -1) |
|
| 260 | 260 | $writer->addAttribute('height', $height); |
| 261 | 261 | |
| 262 | 262 | if(($marginheight = $this->getMarginHeight()) !== -1) |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | $control->setItemType($itemType); |
| 215 | 215 | } |
| 216 | 216 | if($control instanceof \Prado\IDataRenderer) |
| 217 | - $control->attachEventHandler('OnDataBinding', [$this,'dataBindColumn']); |
|
| 217 | + $control->attachEventHandler('OnDataBinding', [$this, 'dataBindColumn']); |
|
| 218 | 218 | } |
| 219 | 219 | elseif($template !== null) |
| 220 | 220 | $template->instantiateIn($cell); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public function getFileName($index = 0) |
| 148 | 148 | { |
| 149 | - return isset($this->_files[$index])?$this->_files[$index]->getFileName():''; |
|
| 149 | + return isset($this->_files[$index]) ? $this->_files[$index]->getFileName() : ''; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function getFileSize($index = 0) |
| 158 | 158 | { |
| 159 | - return isset($this->_files[$index])?$this->_files[$index]->getFileSize():0; |
|
| 159 | + return isset($this->_files[$index]) ? $this->_files[$index]->getFileSize() : 0; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | public function getFileType($index = 0) |
| 169 | 169 | { |
| 170 | - return isset($this->_files[$index])?$this->_files[$index]->getFileType():''; |
|
| 170 | + return isset($this->_files[$index]) ? $this->_files[$index]->getFileType() : ''; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | public function getLocalName($index = 0) |
| 180 | 180 | { |
| 181 | - return isset($this->_files[$index])?$this->_files[$index]->getLocalName():''; |
|
| 181 | + return isset($this->_files[$index]) ? $this->_files[$index]->getLocalName() : ''; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | /** |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function getErrorCode($index = 0) |
| 192 | 192 | { |
| 193 | - return isset($this->_files[$index])?$this->_files[$index]->getErrorCode():UPLOAD_ERR_NO_FILE; |
|
| 193 | + return isset($this->_files[$index]) ? $this->_files[$index]->getErrorCode() : UPLOAD_ERR_NO_FILE; |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | /** |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function getHasFile($index = 0) |
| 202 | 202 | { |
| 203 | - return isset($this->_files[$index])?$this->_files[$index]->getHasFile():false; |
|
| 203 | + return isset($this->_files[$index]) ? $this->_files[$index]->getHasFile() : false; |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | /** |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | public function saveAs($fileName, $deleteTempFile = true, $index = 0) |
| 228 | 228 | { |
| 229 | - return isset($this->_files[$index])?$this->_files[$index]->saveAs($fileName, $deleteTempFile):false; |
|
| 229 | + return isset($this->_files[$index]) ? $this->_files[$index]->saveAs($fileName, $deleteTempFile) : false; |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | /** |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | */ |
| 293 | 293 | public function getValidationPropertyValue() |
| 294 | 294 | { |
| 295 | - return implode(',', array_map(function($file){return $file->getFileName();}, $this->_files)); |
|
| 295 | + return implode(',', array_map(function($file) {return $file->getFileName(); }, $this->_files)); |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | /** |