@@ -55,16 +55,16 @@ discard block |
||
| 55 | 55 | protected function __getZappableSleepProps(&$exprops) |
| 56 | 56 | { |
| 57 | 57 | parent::__getZappableSleepProps($exprops); |
| 58 | - if ($this->_fields===array()) |
|
| 59 | - $exprops[] = "\0TStyle\0_fields"; |
|
| 58 | + if($this->_fields===array()) |
|
| 59 | + $exprops[]="\0TStyle\0_fields"; |
|
| 60 | 60 | if($this->_font===null) |
| 61 | - $exprops[] = "\0TStyle\0_font"; |
|
| 61 | + $exprops[]="\0TStyle\0_font"; |
|
| 62 | 62 | if($this->_class===null) |
| 63 | - $exprops[] = "\0TStyle\0_class"; |
|
| 64 | - if ($this->_customStyle===null) |
|
| 65 | - $exprops[] = "\0TStyle\0_customStyle"; |
|
| 66 | - if ($this->_displayStyle==='Fixed') |
|
| 67 | - $exprops[] = "\0TStyle\0_displayStyle"; |
|
| 63 | + $exprops[]="\0TStyle\0_class"; |
|
| 64 | + if($this->_customStyle===null) |
|
| 65 | + $exprops[]="\0TStyle\0_customStyle"; |
|
| 66 | + if($this->_displayStyle==='Fixed') |
|
| 67 | + $exprops[]="\0TStyle\0_displayStyle"; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | public function __clone() |
| 84 | 84 | { |
| 85 | 85 | if($this->_font!==null) |
| 86 | - $this->_font = clone($this->_font); |
|
| 86 | + $this->_font=clone($this->_font); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -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 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | public function hasFont() |
| 204 | 204 | { |
| 205 | - return $this->_font !== null; |
|
| 205 | + return $this->_font!==null; |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
@@ -210,20 +210,20 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function setDisplayStyle($value) |
| 212 | 212 | { |
| 213 | - $this->_displayStyle = TPropertyValue::ensureEnum($value, 'TDisplayStyle'); |
|
| 213 | + $this->_displayStyle=TPropertyValue::ensureEnum($value, 'TDisplayStyle'); |
|
| 214 | 214 | switch($this->_displayStyle) |
| 215 | 215 | { |
| 216 | 216 | case TDisplayStyle::None: |
| 217 | - $this->_fields['display'] = 'none'; |
|
| 217 | + $this->_fields['display']='none'; |
|
| 218 | 218 | break; |
| 219 | 219 | case TDisplayStyle::Dynamic: |
| 220 | - $this->_fields['display'] = ''; //remove the display property |
|
| 220 | + $this->_fields['display']=''; //remove the display property |
|
| 221 | 221 | break; |
| 222 | 222 | case TDisplayStyle::Fixed: |
| 223 | - $this->_fields['visibility'] = 'visible'; |
|
| 223 | + $this->_fields['visibility']='visible'; |
|
| 224 | 224 | break; |
| 225 | 225 | case TDisplayStyle::Hidden: |
| 226 | - $this->_fields['visibility'] = 'hidden'; |
|
| 226 | + $this->_fields['visibility']='hidden'; |
|
| 227 | 227 | break; |
| 228 | 228 | } |
| 229 | 229 | } |
@@ -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 | /** |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * @param string style field name |
| 307 | 307 | * @param string style field value |
| 308 | 308 | */ |
| 309 | - public function setStyleField($name,$value) |
|
| 309 | + public function setStyleField($name, $value) |
|
| 310 | 310 | { |
| 311 | 311 | $this->_fields[$name]=$value; |
| 312 | 312 | } |
@@ -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 | /** |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | { |
| 366 | 366 | if($style instanceof TStyle) |
| 367 | 367 | { |
| 368 | - $this->_fields=array_merge($this->_fields,$style->_fields); |
|
| 368 | + $this->_fields=array_merge($this->_fields, $style->_fields); |
|
| 369 | 369 | if($style->_class!==null) |
| 370 | 370 | $this->_class=$style->_class; |
| 371 | 371 | if($style->_customStyle!==null) |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | { |
| 386 | 386 | if($style instanceof TStyle) |
| 387 | 387 | { |
| 388 | - $this->_fields=array_merge($style->_fields,$this->_fields); |
|
| 388 | + $this->_fields=array_merge($style->_fields, $this->_fields); |
|
| 389 | 389 | if($this->_class===null) |
| 390 | 390 | $this->_class=$style->_class; |
| 391 | 391 | if($this->_customStyle===null) |
@@ -403,18 +403,18 @@ discard block |
||
| 403 | 403 | { |
| 404 | 404 | if($this->_customStyle!==null) |
| 405 | 405 | { |
| 406 | - foreach(explode(';',$this->_customStyle) as $style) |
|
| 406 | + foreach(explode(';', $this->_customStyle) as $style) |
|
| 407 | 407 | { |
| 408 | - $arr=explode(':',$style,2); |
|
| 408 | + $arr=explode(':', $style, 2); |
|
| 409 | 409 | if(isset($arr[1]) && trim($arr[0])!=='') |
| 410 | - $writer->addStyleAttribute(trim($arr[0]),trim($arr[1])); |
|
| 410 | + $writer->addStyleAttribute(trim($arr[0]), trim($arr[1])); |
|
| 411 | 411 | } |
| 412 | 412 | } |
| 413 | 413 | $writer->addStyleAttributes($this->_fields); |
| 414 | 414 | if($this->_font!==null) |
| 415 | 415 | $this->_font->addAttributesToRender($writer); |
| 416 | 416 | if($this->_class!==null) |
| 417 | - $writer->addAttribute('class',$this->_class); |
|
| 417 | + $writer->addAttribute('class', $this->_class); |
|
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | /** |
@@ -492,18 +492,18 @@ discard block |
||
| 492 | 492 | protected function __getZappableSleepProps(&$exprops) |
| 493 | 493 | { |
| 494 | 494 | parent::__getZappableSleepProps($exprops); |
| 495 | - if ($this->_backImageUrl===null) |
|
| 496 | - $exprops[] = "\0TTableStyle\0_backImageUrl"; |
|
| 497 | - if ($this->_horizontalAlign===null) |
|
| 498 | - $exprops[] = "\0TTableStyle\0_horizontalAlign"; |
|
| 499 | - if ($this->_cellPadding===null) |
|
| 500 | - $exprops[] = "\0TTableStyle\0_cellPadding"; |
|
| 501 | - if ($this->_cellSpacing===null) |
|
| 502 | - $exprops[] = "\0TTableStyle\0_cellSpacing"; |
|
| 503 | - if ($this->_gridLines===null) |
|
| 504 | - $exprops[] = "\0TTableStyle\0_gridLines"; |
|
| 505 | - if ($this->_borderCollapse===null) |
|
| 506 | - $exprops[] = "\0TTableStyle\0_borderCollapse"; |
|
| 495 | + if($this->_backImageUrl===null) |
|
| 496 | + $exprops[]="\0TTableStyle\0_backImageUrl"; |
|
| 497 | + if($this->_horizontalAlign===null) |
|
| 498 | + $exprops[]="\0TTableStyle\0_horizontalAlign"; |
|
| 499 | + if($this->_cellPadding===null) |
|
| 500 | + $exprops[]="\0TTableStyle\0_cellPadding"; |
|
| 501 | + if($this->_cellSpacing===null) |
|
| 502 | + $exprops[]="\0TTableStyle\0_cellSpacing"; |
|
| 503 | + if($this->_gridLines===null) |
|
| 504 | + $exprops[]="\0TTableStyle\0_gridLines"; |
|
| 505 | + if($this->_borderCollapse===null) |
|
| 506 | + $exprops[]="\0TTableStyle\0_borderCollapse"; |
|
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | /** |
@@ -582,25 +582,25 @@ discard block |
||
| 582 | 582 | public function addAttributesToRender($writer) |
| 583 | 583 | { |
| 584 | 584 | if(($url=trim($this->getBackImageUrl()))!=='') |
| 585 | - $writer->addStyleAttribute('background-image','url('.$url.')'); |
|
| 585 | + $writer->addStyleAttribute('background-image', 'url('.$url.')'); |
|
| 586 | 586 | |
| 587 | 587 | if(($horizontalAlign=$this->getHorizontalAlign())!==THorizontalAlign::NotSet) |
| 588 | - $writer->addStyleAttribute('text-align',strtolower($horizontalAlign)); |
|
| 588 | + $writer->addStyleAttribute('text-align', strtolower($horizontalAlign)); |
|
| 589 | 589 | |
| 590 | - if(($cellPadding=$this->getCellPadding())>=0) |
|
| 591 | - $writer->addAttribute('cellpadding',"$cellPadding"); |
|
| 590 | + if(($cellPadding=$this->getCellPadding()) >= 0) |
|
| 591 | + $writer->addAttribute('cellpadding', "$cellPadding"); |
|
| 592 | 592 | |
| 593 | - if(($cellSpacing=$this->getCellSpacing())>=0) |
|
| 594 | - $writer->addAttribute('cellspacing',"$cellSpacing"); |
|
| 593 | + if(($cellSpacing=$this->getCellSpacing()) >= 0) |
|
| 594 | + $writer->addAttribute('cellspacing', "$cellSpacing"); |
|
| 595 | 595 | |
| 596 | 596 | if($this->getBorderCollapse()) |
| 597 | - $writer->addStyleAttribute('border-collapse','collapse'); |
|
| 597 | + $writer->addStyleAttribute('border-collapse', 'collapse'); |
|
| 598 | 598 | |
| 599 | 599 | switch($this->getGridLines()) |
| 600 | 600 | { |
| 601 | - case TTableGridLines::Horizontal : $writer->addAttribute('rules','rows'); break; |
|
| 602 | - case TTableGridLines::Vertical : $writer->addAttribute('rules','cols'); break; |
|
| 603 | - case TTableGridLines::Both : $writer->addAttribute('rules','all'); break; |
|
| 601 | + case TTableGridLines::Horizontal : $writer->addAttribute('rules', 'rows'); break; |
|
| 602 | + case TTableGridLines::Vertical : $writer->addAttribute('rules', 'cols'); break; |
|
| 603 | + case TTableGridLines::Both : $writer->addAttribute('rules', 'all'); break; |
|
| 604 | 604 | } |
| 605 | 605 | |
| 606 | 606 | parent::addAttributesToRender($writer); |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | */ |
| 612 | 612 | public function getBackImageUrl() |
| 613 | 613 | { |
| 614 | - return $this->_backImageUrl===null?'':$this->_backImageUrl; |
|
| 614 | + return $this->_backImageUrl===null ? '' : $this->_backImageUrl; |
|
| 615 | 615 | } |
| 616 | 616 | |
| 617 | 617 | /** |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | */ |
| 629 | 629 | public function getHorizontalAlign() |
| 630 | 630 | { |
| 631 | - return $this->_horizontalAlign===null?THorizontalAlign::NotSet:$this->_horizontalAlign; |
|
| 631 | + return $this->_horizontalAlign===null ? THorizontalAlign::NotSet : $this->_horizontalAlign; |
|
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | /** |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | */ |
| 638 | 638 | public function setHorizontalAlign($value) |
| 639 | 639 | { |
| 640 | - $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign'); |
|
| 640 | + $this->_horizontalAlign=TPropertyValue::ensureEnum($value, 'THorizontalAlign'); |
|
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 | /** |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | */ |
| 646 | 646 | public function getCellPadding() |
| 647 | 647 | { |
| 648 | - return $this->_cellPadding===null?-1:$this->_cellPadding; |
|
| 648 | + return $this->_cellPadding===null ?-1 : $this->_cellPadding; |
|
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | /** |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | */ |
| 655 | 655 | public function setCellPadding($value) |
| 656 | 656 | { |
| 657 | - if(($this->_cellPadding=TPropertyValue::ensureInteger($value))<-1) |
|
| 657 | + if(($this->_cellPadding=TPropertyValue::ensureInteger($value)) < -1) |
|
| 658 | 658 | throw new TInvalidDataValueException('tablestyle_cellpadding_invalid'); |
| 659 | 659 | } |
| 660 | 660 | |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | */ |
| 664 | 664 | public function getCellSpacing() |
| 665 | 665 | { |
| 666 | - return $this->_cellSpacing===null?-1:$this->_cellSpacing; |
|
| 666 | + return $this->_cellSpacing===null ?-1 : $this->_cellSpacing; |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | /** |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | */ |
| 673 | 673 | public function setCellSpacing($value) |
| 674 | 674 | { |
| 675 | - if(($this->_cellSpacing=TPropertyValue::ensureInteger($value))<-1) |
|
| 675 | + if(($this->_cellSpacing=TPropertyValue::ensureInteger($value)) < -1) |
|
| 676 | 676 | throw new TInvalidDataValueException('tablestyle_cellspacing_invalid'); |
| 677 | 677 | } |
| 678 | 678 | |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | */ |
| 682 | 682 | public function getGridLines() |
| 683 | 683 | { |
| 684 | - return $this->_gridLines===null?TTableGridLines::None:$this->_gridLines; |
|
| 684 | + return $this->_gridLines===null ? TTableGridLines::None : $this->_gridLines; |
|
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | /** |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | */ |
| 691 | 691 | public function setGridLines($value) |
| 692 | 692 | { |
| 693 | - $this->_gridLines=TPropertyValue::ensureEnum($value,'TTableGridLines'); |
|
| 693 | + $this->_gridLines=TPropertyValue::ensureEnum($value, 'TTableGridLines'); |
|
| 694 | 694 | } |
| 695 | 695 | |
| 696 | 696 | |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | */ |
| 700 | 700 | public function getBorderCollapse() |
| 701 | 701 | { |
| 702 | - return $this->_borderCollapse===null?false:$this->_borderCollapse; |
|
| 702 | + return $this->_borderCollapse===null ? false : $this->_borderCollapse; |
|
| 703 | 703 | } |
| 704 | 704 | |
| 705 | 705 | /** |
@@ -743,12 +743,12 @@ discard block |
||
| 743 | 743 | protected function __getZappableSleepProps(&$exprops) |
| 744 | 744 | { |
| 745 | 745 | parent::__getZappableSleepProps($exprops); |
| 746 | - if ($this->_horizontalAlign===null) |
|
| 747 | - $exprops[] = "\0TTableItemStyle\0_horizontalAlign"; |
|
| 748 | - if ($this->_verticalAlign===null) |
|
| 749 | - $exprops[] = "\0TTableItemStyle\0_verticalAlign"; |
|
| 750 | - if ($this->_wrap===null) |
|
| 751 | - $exprops[] = "\0TTableItemStyle\0_wrap"; |
|
| 746 | + if($this->_horizontalAlign===null) |
|
| 747 | + $exprops[]="\0TTableItemStyle\0_horizontalAlign"; |
|
| 748 | + if($this->_verticalAlign===null) |
|
| 749 | + $exprops[]="\0TTableItemStyle\0_verticalAlign"; |
|
| 750 | + if($this->_wrap===null) |
|
| 751 | + $exprops[]="\0TTableItemStyle\0_wrap"; |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | /** |
@@ -812,13 +812,13 @@ discard block |
||
| 812 | 812 | public function addAttributesToRender($writer) |
| 813 | 813 | { |
| 814 | 814 | if(!$this->getWrap()) |
| 815 | - $writer->addStyleAttribute('white-space','nowrap'); |
|
| 815 | + $writer->addStyleAttribute('white-space', 'nowrap'); |
|
| 816 | 816 | |
| 817 | 817 | if(($horizontalAlign=$this->getHorizontalAlign())!==THorizontalAlign::NotSet) |
| 818 | - $writer->addAttribute('align',strtolower($horizontalAlign)); |
|
| 818 | + $writer->addAttribute('align', strtolower($horizontalAlign)); |
|
| 819 | 819 | |
| 820 | 820 | if(($verticalAlign=$this->getVerticalAlign())!==TVerticalAlign::NotSet) |
| 821 | - $writer->addAttribute('valign',strtolower($verticalAlign)); |
|
| 821 | + $writer->addAttribute('valign', strtolower($verticalAlign)); |
|
| 822 | 822 | |
| 823 | 823 | parent::addAttributesToRender($writer); |
| 824 | 824 | } |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | */ |
| 829 | 829 | public function getHorizontalAlign() |
| 830 | 830 | { |
| 831 | - return $this->_horizontalAlign===null?THorizontalAlign::NotSet:$this->_horizontalAlign; |
|
| 831 | + return $this->_horizontalAlign===null ? THorizontalAlign::NotSet : $this->_horizontalAlign; |
|
| 832 | 832 | } |
| 833 | 833 | |
| 834 | 834 | /** |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | */ |
| 838 | 838 | public function setHorizontalAlign($value) |
| 839 | 839 | { |
| 840 | - $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign'); |
|
| 840 | + $this->_horizontalAlign=TPropertyValue::ensureEnum($value, 'THorizontalAlign'); |
|
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | /** |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | */ |
| 846 | 846 | public function getVerticalAlign() |
| 847 | 847 | { |
| 848 | - return $this->_verticalAlign===null?TVerticalAlign::NotSet:$this->_verticalAlign; |
|
| 848 | + return $this->_verticalAlign===null ? TVerticalAlign::NotSet : $this->_verticalAlign; |
|
| 849 | 849 | } |
| 850 | 850 | |
| 851 | 851 | /** |
@@ -854,7 +854,7 @@ discard block |
||
| 854 | 854 | */ |
| 855 | 855 | public function setVerticalAlign($value) |
| 856 | 856 | { |
| 857 | - $this->_verticalAlign=TPropertyValue::ensureEnum($value,'TVerticalAlign'); |
|
| 857 | + $this->_verticalAlign=TPropertyValue::ensureEnum($value, 'TVerticalAlign'); |
|
| 858 | 858 | } |
| 859 | 859 | |
| 860 | 860 | /** |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | */ |
| 863 | 863 | public function getWrap() |
| 864 | 864 | { |
| 865 | - return $this->_wrap===null?true:$this->_wrap; |
|
| 865 | + return $this->_wrap===null ? true : $this->_wrap; |
|
| 866 | 866 | } |
| 867 | 867 | |
| 868 | 868 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function getMinValue() |
| 67 | 67 | { |
| 68 | - return $this->getViewState('MinValue',''); |
|
| 68 | + return $this->getViewState('MinValue', ''); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function setMinValue($value) |
| 76 | 76 | { |
| 77 | - $this->setViewState('MinValue',TPropertyValue::ensureString($value),''); |
|
| 77 | + $this->setViewState('MinValue', TPropertyValue::ensureString($value), ''); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function getMaxValue() |
| 84 | 84 | { |
| 85 | - return $this->getViewState('MaxValue',''); |
|
| 85 | + return $this->getViewState('MaxValue', ''); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function setMaxValue($value) |
| 93 | 93 | { |
| 94 | - $this->setViewState('MaxValue',TPropertyValue::ensureString($value),''); |
|
| 94 | + $this->setViewState('MaxValue', TPropertyValue::ensureString($value), ''); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function setStrictComparison($value) |
| 101 | 101 | { |
| 102 | - $this->setViewState('StrictComparison', TPropertyValue::ensureBoolean($value),false); |
|
| 102 | + $this->setViewState('StrictComparison', TPropertyValue::ensureBoolean($value), false); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function getDataType() |
| 118 | 118 | { |
| 119 | - return $this->getViewState('DataType',TRangeValidationDataType::String); |
|
| 119 | + return $this->getViewState('DataType', TRangeValidationDataType::String); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public function setDataType($value) |
| 127 | 127 | { |
| 128 | - $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TRangeValidationDataType'),TRangeValidationDataType::String); |
|
| 128 | + $this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'TRangeValidationDataType'), TRangeValidationDataType::String); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -198,16 +198,16 @@ discard block |
||
| 198 | 198 | $minValue=$this->getMinValue(); |
| 199 | 199 | $maxValue=$this->getMaxValue(); |
| 200 | 200 | |
| 201 | - $valid=preg_match('/^[-+]?[0-9]+$/',trim($value)); |
|
| 201 | + $valid=preg_match('/^[-+]?[0-9]+$/', trim($value)); |
|
| 202 | 202 | $value=intval($value); |
| 203 | 203 | if($minValue!=='') |
| 204 | 204 | $valid=$valid && $this->isGreaterThan($value, intval($minValue)); |
| 205 | 205 | if($maxValue!=='') |
| 206 | - $valid=$valid && $this->isLessThan($value,intval($maxValue)); |
|
| 206 | + $valid=$valid && $this->isLessThan($value, intval($maxValue)); |
|
| 207 | 207 | return $valid; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - protected function isLessThan($left,$right) |
|
| 210 | + protected function isLessThan($left, $right) |
|
| 211 | 211 | { |
| 212 | 212 | return $this->getStrictComparison() ? $left < $right : $left <= $right; |
| 213 | 213 | } |
@@ -227,12 +227,12 @@ discard block |
||
| 227 | 227 | $minValue=$this->getMinValue(); |
| 228 | 228 | $maxValue=$this->getMaxValue(); |
| 229 | 229 | |
| 230 | - $valid=preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value)); |
|
| 230 | + $valid=preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/', trim($value)); |
|
| 231 | 231 | $value=floatval($value); |
| 232 | 232 | if($minValue!=='') |
| 233 | - $valid=$valid && $this->isGreaterThan($value,floatval($minValue)); |
|
| 233 | + $valid=$valid && $this->isGreaterThan($value, floatval($minValue)); |
|
| 234 | 234 | if($maxValue!=='') |
| 235 | - $valid=$valid && $this->isLessThan($value,floatval($maxValue)); |
|
| 235 | + $valid=$valid && $this->isLessThan($value, floatval($maxValue)); |
|
| 236 | 236 | return $valid; |
| 237 | 237 | } |
| 238 | 238 | |
@@ -249,24 +249,24 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | $valid=true; |
| 251 | 251 | |
| 252 | - $dateFormat = $this->getDateFormat(); |
|
| 252 | + $dateFormat=$this->getDateFormat(); |
|
| 253 | 253 | if($dateFormat!=='') |
| 254 | 254 | { |
| 255 | 255 | $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat); |
| 256 | - $value = $formatter->parse($value); |
|
| 256 | + $value=$formatter->parse($value); |
|
| 257 | 257 | if($minValue!=='') |
| 258 | - $valid=$valid && $this->isGreaterThan($value,$formatter->parse($minValue)); |
|
| 258 | + $valid=$valid && $this->isGreaterThan($value, $formatter->parse($minValue)); |
|
| 259 | 259 | if($maxValue!=='') |
| 260 | - $valid=$valid && $this->isLessThan($value,$formatter->parse($maxValue)); |
|
| 260 | + $valid=$valid && $this->isLessThan($value, $formatter->parse($maxValue)); |
|
| 261 | 261 | return $valid; |
| 262 | 262 | } |
| 263 | 263 | else |
| 264 | 264 | { |
| 265 | 265 | $value=strtotime($value); |
| 266 | 266 | if($minValue!=='') |
| 267 | - $valid=$valid && $this->isGreaterThan($value,strtotime($minValue)); |
|
| 267 | + $valid=$valid && $this->isGreaterThan($value, strtotime($minValue)); |
|
| 268 | 268 | if($maxValue!=='') |
| 269 | - $valid=$valid && $this->isLessThan($value,strtotime($maxValue)); |
|
| 269 | + $valid=$valid && $this->isLessThan($value, strtotime($maxValue)); |
|
| 270 | 270 | return $valid; |
| 271 | 271 | } |
| 272 | 272 | } |
@@ -284,9 +284,9 @@ discard block |
||
| 284 | 284 | |
| 285 | 285 | $valid=true; |
| 286 | 286 | if($minValue!=='') |
| 287 | - $valid=$valid && $this->isGreaterThan(strcmp($value,$minValue),0); |
|
| 287 | + $valid=$valid && $this->isGreaterThan(strcmp($value, $minValue), 0); |
|
| 288 | 288 | if($maxValue!=='') |
| 289 | - $valid=$valid && $this->isLessThan(strcmp($value,$maxValue),0); |
|
| 289 | + $valid=$valid && $this->isLessThan(strcmp($value, $maxValue), 0); |
|
| 290 | 290 | return $valid; |
| 291 | 291 | } |
| 292 | 292 | |
@@ -300,20 +300,20 @@ discard block |
||
| 300 | 300 | $maxValue=$this->getMaxValue(); |
| 301 | 301 | |
| 302 | 302 | $valid=true; |
| 303 | - $charset = $this->getCharset(); |
|
| 303 | + $charset=$this->getCharset(); |
|
| 304 | 304 | if($charset==='') |
| 305 | 305 | { |
| 306 | - $app= $this->getApplication()->getGlobalization(); |
|
| 307 | - $charset = $app ? $app->getCharset() : null; |
|
| 306 | + $app=$this->getApplication()->getGlobalization(); |
|
| 307 | + $charset=$app ? $app->getCharset() : null; |
|
| 308 | 308 | if(!$charset) |
| 309 | - $charset = 'UTF-8'; |
|
| 309 | + $charset='UTF-8'; |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - $length = iconv_strlen($value, $charset); |
|
| 312 | + $length=iconv_strlen($value, $charset); |
|
| 313 | 313 | if($minValue!=='') |
| 314 | - $valid = $valid && $this->isGreaterThan($length,intval($minValue)); |
|
| 314 | + $valid=$valid && $this->isGreaterThan($length, intval($minValue)); |
|
| 315 | 315 | if($maxValue!=='') |
| 316 | - $valid = $valid && $this->isLessThan($length,intval($maxValue)); |
|
| 316 | + $valid=$valid && $this->isLessThan($length, intval($maxValue)); |
|
| 317 | 317 | return $valid; |
| 318 | 318 | } |
| 319 | 319 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | class TColorPicker extends TTextBox |
| 39 | 39 | { |
| 40 | - const SCRIPT_PATH = 'prado/colorpicker'; |
|
| 40 | + const SCRIPT_PATH='prado/colorpicker'; |
|
| 41 | 41 | |
| 42 | 42 | private $_clientSide; |
| 43 | 43 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function getShowColorPicker() |
| 48 | 48 | { |
| 49 | - return $this->getViewState('ShowColorPicker',true); |
|
| 49 | + return $this->getViewState('ShowColorPicker', true); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function setShowColorPicker($value) |
| 57 | 57 | { |
| 58 | - $this->setViewState('ShowColorPicker',TPropertyValue::ensureBoolean($value),true); |
|
| 58 | + $this->setViewState('ShowColorPicker', TPropertyValue::ensureBoolean($value), true); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | public function getClientSide() |
| 129 | 129 | { |
| 130 | 130 | if($this->_clientSide===null) |
| 131 | - $this->_clientSide = $this->createClientSide(); |
|
| 131 | + $this->_clientSide=$this->createClientSide(); |
|
| 132 | 132 | return $this->_clientSide; |
| 133 | 133 | } |
| 134 | 134 | |
@@ -146,18 +146,18 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | protected function getPostBackOptions() |
| 148 | 148 | { |
| 149 | - $options = parent::getPostBackOptions(); |
|
| 150 | - $options['ClassName'] = $this->getCssClass(); |
|
| 151 | - $options['ShowColorPicker'] = $this->getShowColorPicker(); |
|
| 149 | + $options=parent::getPostBackOptions(); |
|
| 150 | + $options['ClassName']=$this->getCssClass(); |
|
| 151 | + $options['ShowColorPicker']=$this->getShowColorPicker(); |
|
| 152 | 152 | if($options['ShowColorPicker']) |
| 153 | 153 | { |
| 154 | - $mode = $this->getMode(); |
|
| 155 | - if($mode == TColorPickerMode::Full) $options['Mode'] = $mode; |
|
| 156 | - else if($mode == TColorPickerMode::Simple) $options['Palette'] = 'Tiny'; |
|
| 157 | - $options['OKButtonText'] = $this->getOKButtonText(); |
|
| 158 | - $options['CancelButtonText'] = $this->getCancelButtonText(); |
|
| 154 | + $mode=$this->getMode(); |
|
| 155 | + if($mode==TColorPickerMode::Full) $options['Mode']=$mode; |
|
| 156 | + else if($mode==TColorPickerMode::Simple) $options['Palette']='Tiny'; |
|
| 157 | + $options['OKButtonText']=$this->getOKButtonText(); |
|
| 158 | + $options['CancelButtonText']=$this->getCancelButtonText(); |
|
| 159 | 159 | } |
| 160 | - $options = array_merge($options,$this->getClientSide()->getOptions()->toArray()); |
|
| 160 | + $options=array_merge($options, $this->getClientSide()->getOptions()->toArray()); |
|
| 161 | 161 | return $options; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | protected function getAssetUrl($file='') |
| 169 | 169 | { |
| 170 | - $base = $this->getPage()->getClientScript()->getPradoScriptAssetUrl(); |
|
| 170 | + $base=$this->getPage()->getClientScript()->getPradoScriptAssetUrl(); |
|
| 171 | 171 | return $base.'/'.self::SCRIPT_PATH.'/'.$file; |
| 172 | 172 | } |
| 173 | 173 | |
@@ -185,15 +185,15 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | protected function publishColorPickerAssets() |
| 187 | 187 | { |
| 188 | - $cs = $this->getPage()->getClientScript(); |
|
| 189 | - $key = "prado:".get_class($this); |
|
| 190 | - $imgs['button.gif'] = $this->getAssetUrl('button.gif'); |
|
| 191 | - $imgs['background.png'] = $this->getAssetUrl('background.png'); |
|
| 192 | - $options = TJavaScript::encode($imgs); |
|
| 193 | - $code = "Prado.WebUI.TColorPicker.UIImages = {$options};"; |
|
| 188 | + $cs=$this->getPage()->getClientScript(); |
|
| 189 | + $key="prado:".get_class($this); |
|
| 190 | + $imgs['button.gif']=$this->getAssetUrl('button.gif'); |
|
| 191 | + $imgs['background.png']=$this->getAssetUrl('background.png'); |
|
| 192 | + $options=TJavaScript::encode($imgs); |
|
| 193 | + $code="Prado.WebUI.TColorPicker.UIImages = {$options};"; |
|
| 194 | 194 | $cs->registerEndScript($key, $code); |
| 195 | 195 | $cs->registerPradoScript("colorpicker"); |
| 196 | - $url = $this->getAssetUrl($this->getColorPickerStyle().'.css'); |
|
| 196 | + $url=$this->getAssetUrl($this->getColorPickerStyle().'.css'); |
|
| 197 | 197 | if(!$cs->isStyleSheetFileRegistered($url)) |
| 198 | 198 | $cs->registerStyleSheetFile($url, $url); |
| 199 | 199 | } |
@@ -208,13 +208,13 @@ discard block |
||
| 208 | 208 | { |
| 209 | 209 | parent::renderEndTag($writer); |
| 210 | 210 | |
| 211 | - $color = $this->getText(); |
|
| 211 | + $color=$this->getText(); |
|
| 212 | 212 | $writer->addAttribute('class', 'TColorPicker_button'); |
| 213 | 213 | $writer->renderBeginTag('span'); |
| 214 | 214 | |
| 215 | 215 | $writer->addAttribute('id', $this->getClientID().'_button'); |
| 216 | 216 | $writer->addAttribute('src', $this->getAssetUrl('button.gif')); |
| 217 | - if($color !== '') |
|
| 217 | + if($color!=='') |
|
| 218 | 218 | $writer->addAttribute('style', "background-color:{$color};"); |
| 219 | 219 | $writer->addAttribute('width', '20'); |
| 220 | 220 | $writer->addAttribute('height', '20'); |
@@ -42,11 +42,11 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | parent::addAttributesToRender($writer); |
| 44 | 44 | if(($scope=$this->getScope())!==TTableHeaderScope::NotSet) |
| 45 | - $writer->addAttribute('scope',$scope===TTableHeaderScope::Row?'row':'col'); |
|
| 45 | + $writer->addAttribute('scope', $scope===TTableHeaderScope::Row ? 'row' : 'col'); |
|
| 46 | 46 | if(($text=$this->getAbbreviatedText())!=='') |
| 47 | - $writer->addAttribute('abbr',$text); |
|
| 47 | + $writer->addAttribute('abbr', $text); |
|
| 48 | 48 | if(($text=$this->getCategoryText())!=='') |
| 49 | - $writer->addAttribute('axis',$text); |
|
| 49 | + $writer->addAttribute('axis', $text); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function getScope() |
| 56 | 56 | { |
| 57 | - return $this->getViewState('Scope',TTableHeaderScope::NotSet); |
|
| 57 | + return $this->getViewState('Scope', TTableHeaderScope::NotSet); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function setScope($value) |
| 64 | 64 | { |
| 65 | - $this->setViewState('Scope',TPropertyValue::ensureEnum($value,'TTableHeaderScope'),TTableHeaderScope::NotSet); |
|
| 65 | + $this->setViewState('Scope', TPropertyValue::ensureEnum($value, 'TTableHeaderScope'), TTableHeaderScope::NotSet); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function getAbbreviatedText() |
| 72 | 72 | { |
| 73 | - return $this->getViewState('AbbreviatedText',''); |
|
| 73 | + return $this->getViewState('AbbreviatedText', ''); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function setAbbreviatedText($value) |
| 80 | 80 | { |
| 81 | - $this->setViewState('AbbreviatedText',$value,''); |
|
| 81 | + $this->setViewState('AbbreviatedText', $value, ''); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function getCategoryText() |
| 88 | 88 | { |
| 89 | - return $this->getViewState('CategoryText',''); |
|
| 89 | + return $this->getViewState('CategoryText', ''); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function setCategoryText($value) |
| 96 | 96 | { |
| 97 | - $this->setViewState('CategoryText',$value,''); |
|
| 97 | + $this->setViewState('CategoryText', $value, ''); |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param integer zero-based index of the current rendering item. |
| 43 | 43 | * @return TStyle CSS style used for rendering items (including header, footer and separators) |
| 44 | 44 | */ |
| 45 | - public function generateItemStyle($itemType,$index); |
|
| 45 | + public function generateItemStyle($itemType, $index); |
|
| 46 | 46 | /** |
| 47 | 47 | * Renders an item. |
| 48 | 48 | * @param THtmlWriter writer for the rendering purpose |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param string item type |
| 51 | 51 | * @param integer zero-based index of the item being rendered |
| 52 | 52 | */ |
| 53 | - public function renderItem($writer,$repeatInfo,$itemType,$index); |
|
| 53 | + public function renderItem($writer, $repeatInfo, $itemType, $index); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function setCaptionAlign($value) |
| 125 | 125 | { |
| 126 | - $this->_captionAlign=TPropertyValue::ensureEnum($value,'TTableCaptionAlign'); |
|
| 126 | + $this->_captionAlign=TPropertyValue::ensureEnum($value, 'TTableCaptionAlign'); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function setRepeatColumns($value) |
| 141 | 141 | { |
| 142 | - if(($value=TPropertyValue::ensureInteger($value))<0) |
|
| 142 | + if(($value=TPropertyValue::ensureInteger($value)) < 0) |
|
| 143 | 143 | throw new TInvalidDataValueException('repeatinfo_repeatcolumns_invalid'); |
| 144 | 144 | $this->_repeatColumns=$value; |
| 145 | 145 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | public function setRepeatDirection($value) |
| 159 | 159 | { |
| 160 | - $this->_repeatDirection=TPropertyValue::ensureEnum($value,'TRepeatDirection'); |
|
| 160 | + $this->_repeatDirection=TPropertyValue::ensureEnum($value, 'TRepeatDirection'); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function setRepeatLayout($value) |
| 175 | 175 | { |
| 176 | - $this->_repeatLayout=TPropertyValue::ensureEnum($value,'TRepeatLayout'); |
|
| 176 | + $this->_repeatLayout=TPropertyValue::ensureEnum($value, 'TRepeatLayout'); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | else if($this->_repeatLayout===TRepeatLayout::Raw) |
| 196 | 196 | { |
| 197 | - $this->renderRawContents($writer,$user); |
|
| 197 | + $this->renderRawContents($writer, $user); |
|
| 198 | 198 | return; |
| 199 | 199 | } |
| 200 | 200 | else |
@@ -207,9 +207,9 @@ discard block |
||
| 207 | 207 | $writer->writeLine(); |
| 208 | 208 | |
| 209 | 209 | if($this->_repeatDirection===TRepeatDirection::Vertical) |
| 210 | - $this->renderVerticalContents($writer,$user); |
|
| 210 | + $this->renderVerticalContents($writer, $user); |
|
| 211 | 211 | else |
| 212 | - $this->renderHorizontalContents($writer,$user); |
|
| 212 | + $this->renderHorizontalContents($writer, $user); |
|
| 213 | 213 | |
| 214 | 214 | $control->renderEndTag($writer); |
| 215 | 215 | } |
@@ -219,22 +219,22 @@ discard block |
||
| 219 | 219 | * @param THtmlWriter writer for the rendering purpose |
| 220 | 220 | * @param IRepeatInfoUser repeat information user |
| 221 | 221 | */ |
| 222 | - protected function renderRawContents($writer,$user) |
|
| 222 | + protected function renderRawContents($writer, $user) |
|
| 223 | 223 | { |
| 224 | 224 | if($user->getHasHeader()) |
| 225 | - $user->renderItem($writer,$this,'Header',-1); |
|
| 225 | + $user->renderItem($writer, $this, 'Header', -1); |
|
| 226 | 226 | |
| 227 | 227 | // render items |
| 228 | 228 | $hasSeparators=$user->getHasSeparators(); |
| 229 | 229 | $itemCount=$user->getItemCount(); |
| 230 | - for($i=0;$i<$itemCount;++$i) |
|
| 230 | + for($i=0; $i < $itemCount; ++$i) |
|
| 231 | 231 | { |
| 232 | - $user->renderItem($writer,$this,'Item',$i); |
|
| 233 | - if($hasSeparators && $i!=$itemCount-1) |
|
| 234 | - $user->renderItem($writer,$this,'Separator',$i); |
|
| 232 | + $user->renderItem($writer, $this, 'Item', $i); |
|
| 233 | + if($hasSeparators && $i!=$itemCount - 1) |
|
| 234 | + $user->renderItem($writer, $this, 'Separator', $i); |
|
| 235 | 235 | } |
| 236 | 236 | if($user->getHasFooter()) |
| 237 | - $user->renderItem($writer,$this,'Footer',-1); |
|
| 237 | + $user->renderItem($writer, $this, 'Footer', -1); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
@@ -242,52 +242,52 @@ discard block |
||
| 242 | 242 | * @param THtmlWriter writer for the rendering purpose |
| 243 | 243 | * @param IRepeatInfoUser repeat information user |
| 244 | 244 | */ |
| 245 | - protected function renderHorizontalContents($writer,$user) |
|
| 245 | + protected function renderHorizontalContents($writer, $user) |
|
| 246 | 246 | { |
| 247 | 247 | $tableLayout=($this->_repeatLayout===TRepeatLayout::Table); |
| 248 | 248 | $hasSeparators=$user->getHasSeparators(); |
| 249 | 249 | $itemCount=$user->getItemCount(); |
| 250 | - $columns=$this->_repeatColumns===0?$itemCount:$this->_repeatColumns; |
|
| 251 | - $totalColumns=$hasSeparators?$columns+$columns:$columns; |
|
| 252 | - $needBreak=$columns<$itemCount; |
|
| 250 | + $columns=$this->_repeatColumns===0 ? $itemCount : $this->_repeatColumns; |
|
| 251 | + $totalColumns=$hasSeparators ? $columns + $columns : $columns; |
|
| 252 | + $needBreak=$columns < $itemCount; |
|
| 253 | 253 | |
| 254 | 254 | if($user->getHasHeader()) |
| 255 | - $this->renderHeader($writer,$user,$tableLayout,$totalColumns,$needBreak); |
|
| 255 | + $this->renderHeader($writer, $user, $tableLayout, $totalColumns, $needBreak); |
|
| 256 | 256 | |
| 257 | 257 | // render items |
| 258 | 258 | if($tableLayout) |
| 259 | 259 | { |
| 260 | 260 | $writer->renderBeginTag('tbody'); |
| 261 | 261 | $column=0; |
| 262 | - for($i=0;$i<$itemCount;++$i) |
|
| 262 | + for($i=0; $i < $itemCount; ++$i) |
|
| 263 | 263 | { |
| 264 | 264 | if($column==0) |
| 265 | 265 | $writer->renderBeginTag('tr'); |
| 266 | - if(($style=$user->generateItemStyle('Item',$i))!==null) |
|
| 266 | + if(($style=$user->generateItemStyle('Item', $i))!==null) |
|
| 267 | 267 | $style->addAttributesToRender($writer); |
| 268 | 268 | $writer->renderBeginTag('td'); |
| 269 | - $user->renderItem($writer,$this,'Item',$i); |
|
| 269 | + $user->renderItem($writer, $this, 'Item', $i); |
|
| 270 | 270 | $writer->renderEndTag(); |
| 271 | 271 | $writer->writeLine(); |
| 272 | - if($hasSeparators && $i!=$itemCount-1) |
|
| 272 | + if($hasSeparators && $i!=$itemCount - 1) |
|
| 273 | 273 | { |
| 274 | - if(($style=$user->generateItemStyle('Separator',$i))!==null) |
|
| 274 | + if(($style=$user->generateItemStyle('Separator', $i))!==null) |
|
| 275 | 275 | $style->addAttributesToRender($writer); |
| 276 | 276 | $writer->renderBeginTag('td'); |
| 277 | - $user->renderItem($writer,$this,'Separator',$i); |
|
| 277 | + $user->renderItem($writer, $this, 'Separator', $i); |
|
| 278 | 278 | $writer->renderEndTag(); |
| 279 | 279 | $writer->writeLine(); |
| 280 | 280 | } |
| 281 | 281 | $column++; |
| 282 | - if($i==$itemCount-1) |
|
| 282 | + if($i==$itemCount - 1) |
|
| 283 | 283 | { |
| 284 | - $restColumns=$columns-$column; |
|
| 284 | + $restColumns=$columns - $column; |
|
| 285 | 285 | if($hasSeparators) |
| 286 | - $restColumns=$restColumns?$restColumns+$restColumns+1:1; |
|
| 287 | - for($j=0;$j<$restColumns;++$j) |
|
| 286 | + $restColumns=$restColumns ? $restColumns + $restColumns + 1 : 1; |
|
| 287 | + for($j=0; $j < $restColumns; ++$j) |
|
| 288 | 288 | $writer->write("<td></td>\n"); |
| 289 | 289 | } |
| 290 | - if($column==$columns || $i==$itemCount-1) |
|
| 290 | + if($column==$columns || $i==$itemCount - 1) |
|
| 291 | 291 | { |
| 292 | 292 | $writer->renderEndTag(); |
| 293 | 293 | $writer->writeLine(); |
@@ -299,13 +299,13 @@ discard block |
||
| 299 | 299 | else |
| 300 | 300 | { |
| 301 | 301 | $column=0; |
| 302 | - for($i=0;$i<$itemCount;++$i) |
|
| 302 | + for($i=0; $i < $itemCount; ++$i) |
|
| 303 | 303 | { |
| 304 | - $user->renderItem($writer,$this,'Item',$i); |
|
| 305 | - if($hasSeparators && $i!=$itemCount-1) |
|
| 306 | - $user->renderItem($writer,$this,'Separator',$i); |
|
| 304 | + $user->renderItem($writer, $this, 'Item', $i); |
|
| 305 | + if($hasSeparators && $i!=$itemCount - 1) |
|
| 306 | + $user->renderItem($writer, $this, 'Separator', $i); |
|
| 307 | 307 | $column++; |
| 308 | - if($column==$columns || $i==$itemCount-1) |
|
| 308 | + if($column==$columns || $i==$itemCount - 1) |
|
| 309 | 309 | { |
| 310 | 310 | if($needBreak) |
| 311 | 311 | $writer->writeBreak(); |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | if($user->getHasFooter()) |
| 319 | - $this->renderFooter($writer,$user,$tableLayout,$totalColumns,$needBreak); |
|
| 319 | + $this->renderFooter($writer, $user, $tableLayout, $totalColumns, $needBreak); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
@@ -324,12 +324,12 @@ discard block |
||
| 324 | 324 | * @param THtmlWriter writer for the rendering purpose |
| 325 | 325 | * @param IRepeatInfoUser repeat information user |
| 326 | 326 | */ |
| 327 | - protected function renderVerticalContents($writer,$user) |
|
| 327 | + protected function renderVerticalContents($writer, $user) |
|
| 328 | 328 | { |
| 329 | 329 | $tableLayout=($this->_repeatLayout===TRepeatLayout::Table); |
| 330 | 330 | $hasSeparators=$user->getHasSeparators(); |
| 331 | 331 | $itemCount=$user->getItemCount(); |
| 332 | - if($this->_repeatColumns<=1) |
|
| 332 | + if($this->_repeatColumns <= 1) |
|
| 333 | 333 | { |
| 334 | 334 | $rows=$itemCount; |
| 335 | 335 | $columns=1; |
@@ -338,69 +338,69 @@ discard block |
||
| 338 | 338 | else |
| 339 | 339 | { |
| 340 | 340 | $columns=$this->_repeatColumns; |
| 341 | - $rows=(int)(($itemCount+$columns-1)/$columns); |
|
| 342 | - if($rows==0 && $itemCount>0) |
|
| 341 | + $rows=(int) (($itemCount + $columns - 1) / $columns); |
|
| 342 | + if($rows==0 && $itemCount > 0) |
|
| 343 | 343 | $rows=1; |
| 344 | - if(($lastColumns=$itemCount%$columns)==0) |
|
| 344 | + if(($lastColumns=$itemCount % $columns)==0) |
|
| 345 | 345 | $lastColumns=$columns; |
| 346 | 346 | } |
| 347 | - $totalColumns=$hasSeparators?$columns+$columns:$columns; |
|
| 347 | + $totalColumns=$hasSeparators ? $columns + $columns : $columns; |
|
| 348 | 348 | |
| 349 | 349 | if($user->getHasHeader()) |
| 350 | - $this->renderHeader($writer,$user,$tableLayout,$totalColumns,false); |
|
| 350 | + $this->renderHeader($writer, $user, $tableLayout, $totalColumns, false); |
|
| 351 | 351 | |
| 352 | 352 | if($tableLayout) |
| 353 | 353 | { |
| 354 | 354 | $writer->renderBeginTag('tbody'); |
| 355 | 355 | $renderedItems=0; |
| 356 | - for($row=0;$row<$rows;++$row) |
|
| 356 | + for($row=0; $row < $rows; ++$row) |
|
| 357 | 357 | { |
| 358 | 358 | $index=$row; |
| 359 | 359 | $writer->renderBeginTag('tr'); |
| 360 | - for($col=0;$col<$columns;++$col) |
|
| 360 | + for($col=0; $col < $columns; ++$col) |
|
| 361 | 361 | { |
| 362 | - if($renderedItems>=$itemCount) |
|
| 362 | + if($renderedItems >= $itemCount) |
|
| 363 | 363 | break; |
| 364 | - if($col>0) |
|
| 364 | + if($col > 0) |
|
| 365 | 365 | { |
| 366 | 366 | $index+=$rows; |
| 367 | - if($col-1>=$lastColumns) |
|
| 367 | + if($col - 1 >= $lastColumns) |
|
| 368 | 368 | $index--; |
| 369 | 369 | } |
| 370 | - if($index>=$itemCount) |
|
| 370 | + if($index >= $itemCount) |
|
| 371 | 371 | continue; |
| 372 | 372 | $renderedItems++; |
| 373 | - if(($style=$user->generateItemStyle('Item',$index))!==null) |
|
| 373 | + if(($style=$user->generateItemStyle('Item', $index))!==null) |
|
| 374 | 374 | $style->addAttributesToRender($writer); |
| 375 | 375 | $writer->renderBeginTag('td'); |
| 376 | - $user->renderItem($writer,$this,'Item',$index); |
|
| 376 | + $user->renderItem($writer, $this, 'Item', $index); |
|
| 377 | 377 | $writer->renderEndTag(); |
| 378 | 378 | $writer->writeLine(); |
| 379 | 379 | if(!$hasSeparators) |
| 380 | 380 | continue; |
| 381 | - if($renderedItems<$itemCount-1) |
|
| 381 | + if($renderedItems < $itemCount - 1) |
|
| 382 | 382 | { |
| 383 | 383 | if($columns==1) |
| 384 | 384 | { |
| 385 | 385 | $writer->renderEndTag(); |
| 386 | 386 | $writer->renderBeginTag('tr'); |
| 387 | 387 | } |
| 388 | - if(($style=$user->generateItemStyle('Separator',$index))!==null) |
|
| 388 | + if(($style=$user->generateItemStyle('Separator', $index))!==null) |
|
| 389 | 389 | $style->addAttributesToRender($writer); |
| 390 | 390 | $writer->renderBeginTag('td'); |
| 391 | - $user->renderItem($writer,$this,'Separator',$index); |
|
| 391 | + $user->renderItem($writer, $this, 'Separator', $index); |
|
| 392 | 392 | $writer->renderEndTag(); |
| 393 | 393 | $writer->writeLine(); |
| 394 | 394 | } |
| 395 | - else if($columns>1) |
|
| 395 | + else if($columns > 1) |
|
| 396 | 396 | $writer->write("<td></td>\n"); |
| 397 | 397 | } |
| 398 | - if($row==$rows-1) |
|
| 398 | + if($row==$rows - 1) |
|
| 399 | 399 | { |
| 400 | - $restColumns=$columns-$lastColumns; |
|
| 400 | + $restColumns=$columns - $lastColumns; |
|
| 401 | 401 | if($hasSeparators) |
| 402 | 402 | $restColumns+=$restColumns; |
| 403 | - for($col=0;$col<$restColumns;++$col) |
|
| 403 | + for($col=0; $col < $restColumns; ++$col) |
|
| 404 | 404 | $writer->write("<td></td>\n"); |
| 405 | 405 | } |
| 406 | 406 | $writer->renderEndTag(); |
@@ -411,41 +411,41 @@ discard block |
||
| 411 | 411 | else |
| 412 | 412 | { |
| 413 | 413 | $renderedItems=0; |
| 414 | - for($row=0;$row<$rows;++$row) |
|
| 414 | + for($row=0; $row < $rows; ++$row) |
|
| 415 | 415 | { |
| 416 | 416 | $index=$row; |
| 417 | - for($col=0;$col<$columns;++$col) |
|
| 417 | + for($col=0; $col < $columns; ++$col) |
|
| 418 | 418 | { |
| 419 | - if($renderedItems>=$itemCount) |
|
| 419 | + if($renderedItems >= $itemCount) |
|
| 420 | 420 | break; |
| 421 | - if($col>0) |
|
| 421 | + if($col > 0) |
|
| 422 | 422 | { |
| 423 | 423 | $index+=$rows; |
| 424 | - if($col-1>=$lastColumns) |
|
| 424 | + if($col - 1 >= $lastColumns) |
|
| 425 | 425 | $index--; |
| 426 | 426 | } |
| 427 | - if($index>=$itemCount) |
|
| 427 | + if($index >= $itemCount) |
|
| 428 | 428 | continue; |
| 429 | 429 | $renderedItems++; |
| 430 | - $user->renderItem($writer,$this,'Item',$index); |
|
| 430 | + $user->renderItem($writer, $this, 'Item', $index); |
|
| 431 | 431 | $writer->writeLine(); |
| 432 | 432 | if(!$hasSeparators) |
| 433 | 433 | continue; |
| 434 | - if($renderedItems<$itemCount-1) |
|
| 434 | + if($renderedItems < $itemCount - 1) |
|
| 435 | 435 | { |
| 436 | 436 | if($columns==1) |
| 437 | 437 | $writer->writeBreak(); |
| 438 | - $user->renderItem($writer,$this,'Separator',$index); |
|
| 438 | + $user->renderItem($writer, $this, 'Separator', $index); |
|
| 439 | 439 | } |
| 440 | 440 | $writer->writeLine(); |
| 441 | 441 | } |
| 442 | - if($row<$rows-1 || $user->getHasFooter()) |
|
| 442 | + if($row < $rows - 1 || $user->getHasFooter()) |
|
| 443 | 443 | $writer->writeBreak(); |
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | 447 | if($user->getHasFooter()) |
| 448 | - $this->renderFooter($writer,$user,$tableLayout,$totalColumns,false); |
|
| 448 | + $this->renderFooter($writer, $user, $tableLayout, $totalColumns, false); |
|
| 449 | 449 | |
| 450 | 450 | } |
| 451 | 451 | |
@@ -457,26 +457,26 @@ discard block |
||
| 457 | 457 | * @param integer number of columns to be rendered |
| 458 | 458 | * @param boolean if a line break is needed at the end |
| 459 | 459 | */ |
| 460 | - protected function renderHeader($writer,$user,$tableLayout,$columns,$needBreak) |
|
| 460 | + protected function renderHeader($writer, $user, $tableLayout, $columns, $needBreak) |
|
| 461 | 461 | { |
| 462 | 462 | if($tableLayout) |
| 463 | 463 | { |
| 464 | 464 | $writer->renderBeginTag('thead'); |
| 465 | 465 | $writer->renderBeginTag('tr'); |
| 466 | - if($columns>1) |
|
| 467 | - $writer->addAttribute('colspan',"$columns"); |
|
| 468 | - $writer->addAttribute('scope','col'); |
|
| 469 | - if(($style=$user->generateItemStyle('Header',-1))!==null) |
|
| 466 | + if($columns > 1) |
|
| 467 | + $writer->addAttribute('colspan', "$columns"); |
|
| 468 | + $writer->addAttribute('scope', 'col'); |
|
| 469 | + if(($style=$user->generateItemStyle('Header', -1))!==null) |
|
| 470 | 470 | $style->addAttributesToRender($writer); |
| 471 | 471 | $writer->renderBeginTag('th'); |
| 472 | - $user->renderItem($writer,$this,'Header',-1); |
|
| 472 | + $user->renderItem($writer, $this, 'Header', -1); |
|
| 473 | 473 | $writer->renderEndTag(); |
| 474 | 474 | $writer->renderEndTag(); |
| 475 | 475 | $writer->renderEndTag(); |
| 476 | 476 | } |
| 477 | 477 | else |
| 478 | 478 | { |
| 479 | - $user->renderItem($writer,$this,'Header',-1); |
|
| 479 | + $user->renderItem($writer, $this, 'Header', -1); |
|
| 480 | 480 | if($needBreak) |
| 481 | 481 | $writer->writeBreak(); |
| 482 | 482 | } |
@@ -490,24 +490,24 @@ discard block |
||
| 490 | 490 | * @param boolean whether to render using table layout |
| 491 | 491 | * @param integer number of columns to be rendered |
| 492 | 492 | */ |
| 493 | - protected function renderFooter($writer,$user,$tableLayout,$columns) |
|
| 493 | + protected function renderFooter($writer, $user, $tableLayout, $columns) |
|
| 494 | 494 | { |
| 495 | 495 | if($tableLayout) |
| 496 | 496 | { |
| 497 | 497 | $writer->renderBeginTag('tfoot'); |
| 498 | 498 | $writer->renderBeginTag('tr'); |
| 499 | - if($columns>1) |
|
| 500 | - $writer->addAttribute('colspan',"$columns"); |
|
| 501 | - if(($style=$user->generateItemStyle('Footer',-1))!==null) |
|
| 499 | + if($columns > 1) |
|
| 500 | + $writer->addAttribute('colspan', "$columns"); |
|
| 501 | + if(($style=$user->generateItemStyle('Footer', -1))!==null) |
|
| 502 | 502 | $style->addAttributesToRender($writer); |
| 503 | 503 | $writer->renderBeginTag('td'); |
| 504 | - $user->renderItem($writer,$this,'Footer',-1); |
|
| 504 | + $user->renderItem($writer, $this, 'Footer', -1); |
|
| 505 | 505 | $writer->renderEndTag(); |
| 506 | 506 | $writer->renderEndTag(); |
| 507 | 507 | $writer->renderEndTag(); |
| 508 | 508 | } |
| 509 | 509 | else |
| 510 | - $user->renderItem($writer,$this,'Footer',-1); |
|
| 510 | + $user->renderItem($writer, $this, 'Footer', -1); |
|
| 511 | 511 | $writer->writeLine(); |
| 512 | 512 | } |
| 513 | 513 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function getDataType() |
| 51 | 51 | { |
| 52 | - return $this->getViewState('DataType','String'); |
|
| 52 | + return $this->getViewState('DataType', 'String'); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function setDataType($value) |
| 60 | 60 | { |
| 61 | - $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TValidationDataType'),TValidationDataType::String); |
|
| 61 | + $this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'TValidationDataType'), TValidationDataType::String); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -92,14 +92,14 @@ discard block |
||
| 92 | 92 | switch($this->getDataType()) |
| 93 | 93 | { |
| 94 | 94 | case TValidationDataType::Integer: |
| 95 | - return preg_match('/^[-+]?[0-9]+$/',trim($value)); |
|
| 95 | + return preg_match('/^[-+]?[0-9]+$/', trim($value)); |
|
| 96 | 96 | case TValidationDataType::Float: |
| 97 | - return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value)); |
|
| 97 | + return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/', trim($value)); |
|
| 98 | 98 | case TValidationDataType::Date: |
| 99 | - $dateFormat = $this->getDateFormat(); |
|
| 99 | + $dateFormat=$this->getDateFormat(); |
|
| 100 | 100 | if(strlen($dateFormat)) |
| 101 | 101 | { |
| 102 | - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$dateFormat); |
|
| 102 | + $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $dateFormat); |
|
| 103 | 103 | return $formatter->isValidDate($value); |
| 104 | 104 | } |
| 105 | 105 | else |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | protected function getClientScriptOptions() |
| 116 | 116 | { |
| 117 | - $options = parent::getClientScriptOptions(); |
|
| 117 | + $options=parent::getClientScriptOptions(); |
|
| 118 | 118 | $options['DataType']=$this->getDataType(); |
| 119 | 119 | if(($dateFormat=$this->getDateFormat())!=='') |
| 120 | 120 | $options['DateFormat']=$dateFormat; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function getActiveViewIndex() |
| 90 | 90 | { |
| 91 | - return $this->getViewState('ActiveViewIndex',0); |
|
| 91 | + return $this->getViewState('ActiveViewIndex', 0); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function setActiveViewIndex($value) |
| 99 | 99 | { |
| 100 | - $this->setViewState('ActiveViewIndex',TPropertyValue::ensureInteger($value),0); |
|
| 100 | + $this->setViewState('ActiveViewIndex', TPropertyValue::ensureInteger($value), 0); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function getActiveViewID() |
| 110 | 110 | { |
| 111 | - return $this->getViewState('ActiveViewID',''); |
|
| 111 | + return $this->getViewState('ActiveViewID', ''); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function setActiveViewID($value) |
| 118 | 118 | { |
| 119 | - $this->setViewState('ActiveViewID',$value,''); |
|
| 119 | + $this->setViewState('ActiveViewID', $value, ''); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -132,17 +132,17 @@ discard block |
||
| 132 | 132 | $views=$this->getViews(); |
| 133 | 133 | if(($id=$this->getActiveViewID())!=='') |
| 134 | 134 | { |
| 135 | - if(($index=$views->findIndexByID($id))>=0) |
|
| 135 | + if(($index=$views->findIndexByID($id)) >= 0) |
|
| 136 | 136 | $activeView=$views->itemAt($index); |
| 137 | 137 | else |
| 138 | - throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id); |
|
| 138 | + throw new TInvalidDataValueException('tabpanel_activeviewid_invalid', $id); |
|
| 139 | 139 | } |
| 140 | - else if(($index=$this->getActiveViewIndex())>=0) |
|
| 140 | + else if(($index=$this->getActiveViewIndex()) >= 0) |
|
| 141 | 141 | { |
| 142 | - if($index<$views->getCount()) |
|
| 142 | + if($index < $views->getCount()) |
|
| 143 | 143 | $activeView=$views->itemAt($index); |
| 144 | 144 | else |
| 145 | - throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index); |
|
| 145 | + throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid', $index); |
|
| 146 | 146 | } |
| 147 | 147 | else |
| 148 | 148 | { |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function setActiveView($view) |
| 168 | 168 | { |
| 169 | - if($this->getViews()->indexOf($view)>=0) |
|
| 169 | + if($this->getViews()->indexOf($view) >= 0) |
|
| 170 | 170 | $this->activateView($view); |
| 171 | 171 | else |
| 172 | 172 | throw new TInvalidOperationException('tabpanel_view_inexistent'); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public function setAutoSwitch($value) |
| 187 | 187 | { |
| 188 | - $this->setViewState('AutoSwitch',TPropertyValue::ensureBoolean($value)); |
|
| 188 | + $this->setViewState('AutoSwitch', TPropertyValue::ensureBoolean($value)); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | public function getCssUrl() |
| 196 | 196 | { |
| 197 | - return $this->getViewState('CssUrl','default'); |
|
| 197 | + return $this->getViewState('CssUrl', 'default'); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | public function setCssUrl($value) |
| 204 | 204 | { |
| 205 | - $this->setViewState('CssUrl',TPropertyValue::ensureString($value),''); |
|
| 205 | + $this->setViewState('CssUrl', TPropertyValue::ensureString($value), ''); |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | public function getCssClass() |
| 212 | 212 | { |
| 213 | 213 | $cssClass=parent::getCssClass(); |
| 214 | - return $cssClass===''?'tab-panel':$cssClass; |
|
| 214 | + return $cssClass==='' ? 'tab-panel' : $cssClass; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | /** |
@@ -235,11 +235,11 @@ discard block |
||
| 235 | 235 | */ |
| 236 | 236 | public function getViewStyle() |
| 237 | 237 | { |
| 238 | - if(($style=$this->getViewState('ViewStyle',null))===null) |
|
| 238 | + if(($style=$this->getViewState('ViewStyle', null))===null) |
|
| 239 | 239 | { |
| 240 | 240 | $style=new TStyle; |
| 241 | 241 | $style->setCssClass('tab-view'); |
| 242 | - $this->setViewState('ViewStyle',$style,null); |
|
| 242 | + $this->setViewState('ViewStyle', $style, null); |
|
| 243 | 243 | } |
| 244 | 244 | return $style; |
| 245 | 245 | } |
@@ -265,11 +265,11 @@ discard block |
||
| 265 | 265 | */ |
| 266 | 266 | public function getTabStyle() |
| 267 | 267 | { |
| 268 | - if(($style=$this->getViewState('TabStyle',null))===null) |
|
| 268 | + if(($style=$this->getViewState('TabStyle', null))===null) |
|
| 269 | 269 | { |
| 270 | 270 | $style=new TStyle; |
| 271 | 271 | $style->setCssClass('tab-normal'); |
| 272 | - $this->setViewState('TabStyle',$style,null); |
|
| 272 | + $this->setViewState('TabStyle', $style, null); |
|
| 273 | 273 | } |
| 274 | 274 | return $style; |
| 275 | 275 | } |
@@ -295,11 +295,11 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | public function getActiveTabStyle() |
| 297 | 297 | { |
| 298 | - if(($style=$this->getViewState('ActiveTabStyle',null))===null) |
|
| 298 | + if(($style=$this->getViewState('ActiveTabStyle', null))===null) |
|
| 299 | 299 | { |
| 300 | 300 | $style=new TStyle; |
| 301 | 301 | $style->setCssClass('tab-active'); |
| 302 | - $this->setViewState('ActiveTabStyle',$style,null); |
|
| 302 | + $this->setViewState('ActiveTabStyle', $style, null); |
|
| 303 | 303 | } |
| 304 | 304 | return $style; |
| 305 | 305 | } |
@@ -333,11 +333,11 @@ discard block |
||
| 333 | 333 | * @param array the input data collection |
| 334 | 334 | * @return boolean whether the data of the control has been changed |
| 335 | 335 | */ |
| 336 | - public function loadPostData($key,$values) |
|
| 336 | + public function loadPostData($key, $values) |
|
| 337 | 337 | { |
| 338 | 338 | if(($index=$values[$this->getClientID().'_1'])!==null) |
| 339 | 339 | { |
| 340 | - $index=(int)$index; |
|
| 340 | + $index=(int) $index; |
|
| 341 | 341 | $currentIndex=$this->getActiveViewIndex(); |
| 342 | 342 | if($currentIndex!==$index) |
| 343 | 343 | { |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | */ |
| 378 | 378 | protected function addAttributesToRender($writer) |
| 379 | 379 | { |
| 380 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 380 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 381 | 381 | $this->setCssClass($this->getCssClass()); |
| 382 | 382 | parent::addAttributesToRender($writer); |
| 383 | 383 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | public function onPreRender($param) |
| 391 | 391 | { |
| 392 | 392 | parent::onPreRender($param); |
| 393 | - $this->getActiveView(); // determine the active view |
|
| 393 | + $this->getActiveView(); // determine the active view |
|
| 394 | 394 | $this->registerStyleSheet(); |
| 395 | 395 | |
| 396 | 396 | $page=$this->getPage(); |
@@ -405,17 +405,17 @@ discard block |
||
| 405 | 405 | */ |
| 406 | 406 | protected function registerStyleSheet() |
| 407 | 407 | { |
| 408 | - $url = $this->getCssUrl(); |
|
| 408 | + $url=$this->getCssUrl(); |
|
| 409 | 409 | |
| 410 | - if($url === '') { |
|
| 410 | + if($url==='') { |
|
| 411 | 411 | return; |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | - if($url === 'default') { |
|
| 415 | - $url = $this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css'); |
|
| 414 | + if($url==='default') { |
|
| 415 | + $url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'tabpanel.css'); |
|
| 416 | 416 | } |
| 417 | 417 | |
| 418 | - if($url !== '') { |
|
| 418 | + if($url!=='') { |
|
| 419 | 419 | $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url); |
| 420 | 420 | } |
| 421 | 421 | } |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $code="new $className($options);"; |
| 434 | 434 | $cs->registerEndScript("prado:$id", $code); |
| 435 | 435 | // ensure an item is always active and visible |
| 436 | - $index = $this->getActiveViewIndex(); |
|
| 436 | + $index=$this->getActiveViewIndex(); |
|
| 437 | 437 | if(!$this->getViews()->itemAt($index)->Visible) |
| 438 | 438 | $index=0; |
| 439 | 439 | $cs->registerHiddenField($id.'_1', $index); |
@@ -454,19 +454,19 @@ discard block |
||
| 454 | 454 | */ |
| 455 | 455 | protected function getClientOptions() |
| 456 | 456 | { |
| 457 | - $options['ID'] = $this->getClientID(); |
|
| 458 | - $options['ActiveCssClass'] = $this->getActiveTabCssClass(); |
|
| 459 | - $options['NormalCssClass'] = $this->getTabCssClass(); |
|
| 460 | - $viewIDs = array(); |
|
| 461 | - $viewVis = array(); |
|
| 457 | + $options['ID']=$this->getClientID(); |
|
| 458 | + $options['ActiveCssClass']=$this->getActiveTabCssClass(); |
|
| 459 | + $options['NormalCssClass']=$this->getTabCssClass(); |
|
| 460 | + $viewIDs=array(); |
|
| 461 | + $viewVis=array(); |
|
| 462 | 462 | foreach($this->getViews() as $view) |
| 463 | 463 | { |
| 464 | - $viewIDs[] = $view->getClientID(); |
|
| 465 | - $viewVis[] = $view->getVisible(); |
|
| 464 | + $viewIDs[]=$view->getClientID(); |
|
| 465 | + $viewVis[]=$view->getVisible(); |
|
| 466 | 466 | } |
| 467 | - $options['Views'] = $viewIDs; |
|
| 468 | - $options['ViewsVis'] = $viewVis; |
|
| 469 | - $options['AutoSwitch'] = $this->getAutoSwitch(); |
|
| 467 | + $options['Views']=$viewIDs; |
|
| 468 | + $options['ViewsVis']=$viewVis; |
|
| 469 | + $options['AutoSwitch']=$this->getAutoSwitch(); |
|
| 470 | 470 | |
| 471 | 471 | return $options; |
| 472 | 472 | } |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | public function renderContents($writer) |
| 502 | 502 | { |
| 503 | 503 | $views=$this->getViews(); |
| 504 | - if($views->getCount()>0) |
|
| 504 | + if($views->getCount() > 0) |
|
| 505 | 505 | { |
| 506 | 506 | $writer->writeLine(); |
| 507 | 507 | // render tab bar |
@@ -560,13 +560,13 @@ discard block |
||
| 560 | 560 | protected function addAttributesToRender($writer) |
| 561 | 561 | { |
| 562 | 562 | if(!$this->getActive() && $this->getPage()->getClientSupportsJavaScript()) |
| 563 | - $this->getStyle()->setStyleField('display','none'); |
|
| 563 | + $this->getStyle()->setStyleField('display', 'none'); |
|
| 564 | 564 | |
| 565 | 565 | $this->getStyle()->mergeWith($this->getParent()->getViewStyle()); |
| 566 | 566 | |
| 567 | 567 | parent::addAttributesToRender($writer); |
| 568 | 568 | |
| 569 | - $writer->addAttribute('id',$this->getClientID()); |
|
| 569 | + $writer->addAttribute('id', $this->getClientID()); |
|
| 570 | 570 | } |
| 571 | 571 | |
| 572 | 572 | /** |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | */ |
| 575 | 575 | public function getCaption() |
| 576 | 576 | { |
| 577 | - return $this->getViewState('Caption',''); |
|
| 577 | + return $this->getViewState('Caption', ''); |
|
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | /** |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | */ |
| 583 | 583 | public function setCaption($value) |
| 584 | 584 | { |
| 585 | - $this->setViewState('Caption',TPropertyValue::ensureString($value),''); |
|
| 585 | + $this->setViewState('Caption', TPropertyValue::ensureString($value), ''); |
|
| 586 | 586 | } |
| 587 | 587 | |
| 588 | 588 | /** |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | */ |
| 591 | 591 | public function getNavigateUrl() |
| 592 | 592 | { |
| 593 | - return $this->getViewState('NavigateUrl',''); |
|
| 593 | + return $this->getViewState('NavigateUrl', ''); |
|
| 594 | 594 | } |
| 595 | 595 | |
| 596 | 596 | /** |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | */ |
| 601 | 601 | public function setNavigateUrl($value) |
| 602 | 602 | { |
| 603 | - $this->setViewState('NavigateUrl',TPropertyValue::ensureString($value),''); |
|
| 603 | + $this->setViewState('NavigateUrl', TPropertyValue::ensureString($value), ''); |
|
| 604 | 604 | } |
| 605 | 605 | |
| 606 | 606 | /** |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | */ |
| 609 | 609 | public function getText() |
| 610 | 610 | { |
| 611 | - return $this->getViewState('Text',''); |
|
| 611 | + return $this->getViewState('Text', ''); |
|
| 612 | 612 | } |
| 613 | 613 | |
| 614 | 614 | /** |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | */ |
| 619 | 619 | public function setText($value) |
| 620 | 620 | { |
| 621 | - $this->setViewState('Text',TPropertyValue::ensureString($value),''); |
|
| 621 | + $this->setViewState('Text', TPropertyValue::ensureString($value), ''); |
|
| 622 | 622 | } |
| 623 | 623 | |
| 624 | 624 | /** |
@@ -657,9 +657,9 @@ discard block |
||
| 657 | 657 | { |
| 658 | 658 | if($this->getVisible(false) && $this->getPage()->getClientSupportsJavaScript()) |
| 659 | 659 | { |
| 660 | - $writer->addAttribute('id',$this->getClientID().'_0'); |
|
| 660 | + $writer->addAttribute('id', $this->getClientID().'_0'); |
|
| 661 | 661 | |
| 662 | - $style=$this->getActive()?$this->getParent()->getActiveTabStyle():$this->getParent()->getTabStyle(); |
|
| 662 | + $style=$this->getActive() ? $this->getParent()->getActiveTabStyle() : $this->getParent()->getTabStyle(); |
|
| 663 | 663 | $style->addAttributesToRender($writer); |
| 664 | 664 | |
| 665 | 665 | $writer->renderBeginTag($this->getTagName()); |
@@ -703,10 +703,10 @@ discard block |
||
| 703 | 703 | * @param mixed new item |
| 704 | 704 | * @throws TInvalidDataTypeException if the item to be inserted is not a {@link TTabView} object. |
| 705 | 705 | */ |
| 706 | - public function insertAt($index,$item) |
|
| 706 | + public function insertAt($index, $item) |
|
| 707 | 707 | { |
| 708 | 708 | if($item instanceof TTabView) |
| 709 | - parent::insertAt($index,$item); |
|
| 709 | + parent::insertAt($index, $item); |
|
| 710 | 710 | else |
| 711 | 711 | throw new TInvalidDataTypeException('tabviewcollection_tabview_required'); |
| 712 | 712 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @var boolean tells if the decoration uses state in its templates. If there are no templates |
| 66 | 66 | * in the instance of the decoration this variable is unused. |
| 67 | 67 | */ |
| 68 | - private $_usestate = false; |
|
| 68 | + private $_usestate=false; |
|
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * @var TWebControl the control to decorate |
@@ -86,19 +86,19 @@ discard block |
||
| 86 | 86 | /** |
| 87 | 87 | * @var string the text that goes before the open tag |
| 88 | 88 | */ |
| 89 | - private $_pretagtext = ''; |
|
| 89 | + private $_pretagtext=''; |
|
| 90 | 90 | /** |
| 91 | 91 | * @var string the text that goes after the open tag |
| 92 | 92 | */ |
| 93 | - private $_precontentstext = ''; |
|
| 93 | + private $_precontentstext=''; |
|
| 94 | 94 | /** |
| 95 | 95 | * @var string the text that goes before the close tag |
| 96 | 96 | */ |
| 97 | - private $_postcontentstext = ''; |
|
| 97 | + private $_postcontentstext=''; |
|
| 98 | 98 | /** |
| 99 | 99 | * @var string the text that goes after the close tag |
| 100 | 100 | */ |
| 101 | - private $_posttagtext = ''; |
|
| 101 | + private $_posttagtext=''; |
|
| 102 | 102 | |
| 103 | 103 | |
| 104 | 104 | |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | * @param TWebControl The control that is to be decorated. |
| 126 | 126 | * @param boolean whether decoration is just around the inner content |
| 127 | 127 | */ |
| 128 | - public function __construct($control, $onlyinternal = false) { |
|
| 129 | - $this->_control = $control; |
|
| 130 | - $this->_internalonly = $onlyinternal; |
|
| 128 | + public function __construct($control, $onlyinternal=false) { |
|
| 129 | + $this->_control=$control; |
|
| 130 | + $this->_internalonly=$onlyinternal; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function setUseState($value) |
| 146 | 146 | { |
| 147 | - $this->_usestate = TPropertyValue::ensureBoolean($value); |
|
| 147 | + $this->_usestate=TPropertyValue::ensureBoolean($value); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | public function setPreTagText($value) { |
| 161 | 161 | if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) |
| 162 | - $this->_pretagtext = TPropertyValue::ensureString($value); |
|
| 162 | + $this->_pretagtext=TPropertyValue::ensureString($value); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function setPreContentsText($value) { |
| 177 | 177 | if(!$this->_control->getIsSkinApplied()) |
| 178 | - $this->_precontentstext = TPropertyValue::ensureString($value); |
|
| 178 | + $this->_precontentstext=TPropertyValue::ensureString($value); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | public function setPostContentsText($value) { |
| 193 | 193 | if(!$this->_control->getIsSkinApplied()) |
| 194 | - $this->_postcontentstext = TPropertyValue::ensureString($value); |
|
| 194 | + $this->_postcontentstext=TPropertyValue::ensureString($value); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | public function setPostTagText($value) { |
| 209 | 209 | if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) |
| 210 | - $this->_posttagtext = TPropertyValue::ensureString($value); |
|
| 210 | + $this->_posttagtext=TPropertyValue::ensureString($value); |
|
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | */ |
| 224 | 224 | public function setPreTagTemplate($value) { |
| 225 | 225 | if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) |
| 226 | - $this->_pretagtemplate = $value; |
|
| 226 | + $this->_pretagtemplate=$value; |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | */ |
| 240 | 240 | public function setPreContentsTemplate($value) { |
| 241 | 241 | if(!$this->_control->getIsSkinApplied()) |
| 242 | - $this->_precontentstemplate = $value; |
|
| 242 | + $this->_precontentstemplate=$value; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | public function setPostContentsTemplate($value) { |
| 257 | 257 | if(!$this->_control->getIsSkinApplied()) |
| 258 | - $this->_postcontentstemplate = $value; |
|
| 258 | + $this->_postcontentstemplate=$value; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | public function setPostTagTemplate($value) { |
| 273 | 273 | if(!$this->_internalonly && !$this->_control->getIsSkinApplied()) |
| 274 | - $this->_posttagtemplate = $value; |
|
| 274 | + $this->_posttagtemplate=$value; |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | /** |
@@ -280,15 +280,15 @@ discard block |
||
| 280 | 280 | * This call attaches the ensureTemplateDecoration to the TPage onSaveStateComplete so |
| 281 | 281 | * these controls don't have page states. This is as close to not influencing the page as possible. |
| 282 | 282 | */ |
| 283 | - public function instantiate($outercontrol = null) { |
|
| 283 | + public function instantiate($outercontrol=null) { |
|
| 284 | 284 | if($this->getPreTagTemplate() || $this->getPreContentsTemplate() || |
| 285 | 285 | $this->getPostContentsTemplate() || $this->getPostTagTemplate()) { |
| 286 | 286 | |
| 287 | - $this->_outercontrol = $outercontrol; |
|
| 287 | + $this->_outercontrol=$outercontrol; |
|
| 288 | 288 | if($this->getUseState()) |
| 289 | 289 | $this->ensureTemplateDecoration(); |
| 290 | 290 | else |
| 291 | - $this->_control->getPage()->onSaveStateComplete[] = array($this, 'ensureTemplateDecoration'); |
|
| 291 | + $this->_control->getPage()->onSaveStateComplete[]=array($this, 'ensureTemplateDecoration'); |
|
| 292 | 292 | } |
| 293 | 293 | } |
| 294 | 294 | |
@@ -303,26 +303,26 @@ discard block |
||
| 303 | 303 | */ |
| 304 | 304 | public function ensureTemplateDecoration($sender=null, $param=null) { |
| 305 | 305 | |
| 306 | - $control = $this->_control; |
|
| 307 | - $outercontrol = $this->_outercontrol; |
|
| 308 | - if($outercontrol === null) |
|
| 309 | - $outercontrol = $control; |
|
| 306 | + $control=$this->_control; |
|
| 307 | + $outercontrol=$this->_outercontrol; |
|
| 308 | + if($outercontrol===null) |
|
| 309 | + $outercontrol=$control; |
|
| 310 | 310 | |
| 311 | 311 | if($this->_addedTemplateDecoration) |
| 312 | 312 | return $this->_addedTemplateDecoration; |
| 313 | 313 | |
| 314 | - $this->_addedTemplateDecoration = true; |
|
| 314 | + $this->_addedTemplateDecoration=true; |
|
| 315 | 315 | |
| 316 | 316 | if($this->getPreContentsTemplate()) |
| 317 | 317 | { |
| 318 | - $precontents = Prado::createComponent('TCompositeControl'); |
|
| 318 | + $precontents=Prado::createComponent('TCompositeControl'); |
|
| 319 | 319 | $this->getPreContentsTemplate()->instantiateIn($precontents); |
| 320 | 320 | $control->getControls()->insertAt(0, $precontents); |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | if($this->getPostContentsTemplate()) |
| 324 | 324 | { |
| 325 | - $postcontents = Prado::createComponent('TCompositeControl'); |
|
| 325 | + $postcontents=Prado::createComponent('TCompositeControl'); |
|
| 326 | 326 | $this->getPostContentsTemplate()->instantiateIn($postcontents); |
| 327 | 327 | $control->getControls()->add($postcontents); |
| 328 | 328 | } |
@@ -333,14 +333,14 @@ discard block |
||
| 333 | 333 | |
| 334 | 334 | if($this->getPreTagTemplate()) |
| 335 | 335 | { |
| 336 | - $pretag = Prado::createComponent('TCompositeControl'); |
|
| 336 | + $pretag=Prado::createComponent('TCompositeControl'); |
|
| 337 | 337 | $this->getPreTagTemplate()->instantiateIn($pretag); |
| 338 | 338 | $outercontrol->getParent()->getControls()->insertBefore($outercontrol, $pretag); |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | if($this->getPostTagTemplate()) |
| 342 | 342 | { |
| 343 | - $posttag = Prado::createComponent('TCompositeControl'); |
|
| 343 | + $posttag=Prado::createComponent('TCompositeControl'); |
|
| 344 | 344 | $this->getPostTagTemplate()->instantiateIn($posttag); |
| 345 | 345 | $outercontrol->getParent()->getControls()->insertAfter($outercontrol, $posttag); |
| 346 | 346 | } |
@@ -34,11 +34,11 @@ |
||
| 34 | 34 | * @param TEventParameter event parameter |
| 35 | 35 | * @return boolean whether the event bubbling should stop here. |
| 36 | 36 | */ |
| 37 | - public function bubbleEvent($sender,$param) |
|
| 37 | + public function bubbleEvent($sender, $param) |
|
| 38 | 38 | { |
| 39 | 39 | if($param instanceof TCommandEventParameter) |
| 40 | 40 | { |
| 41 | - $this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param)); |
|
| 41 | + $this->raiseBubbleEvent($this, new TRepeaterCommandEventParameter($this, $sender, $param)); |
|
| 42 | 42 | return true; |
| 43 | 43 | } |
| 44 | 44 | else |