@@ -474,8 +474,7 @@ discard block |
||
| 474 | 474 | $this->onItemCreated($param); |
| 475 | 475 | $this->getControls()->add($item); |
| 476 | 476 | return $item; |
| 477 | - } |
|
| 478 | - else |
|
| 477 | + } else |
|
| 479 | 478 | return null; |
| 480 | 479 | } |
| 481 | 480 | |
@@ -499,8 +498,7 @@ discard block |
||
| 499 | 498 | $item->dataBind(); |
| 500 | 499 | $this->onItemDataBound($param); |
| 501 | 500 | return $item; |
| 502 | - } |
|
| 503 | - else |
|
| 501 | + } else |
|
| 504 | 502 | return null; |
| 505 | 503 | } |
| 506 | 504 | |
@@ -550,15 +548,13 @@ discard block |
||
| 550 | 548 | $item->setItemIndex($itemIndex); |
| 551 | 549 | $item->setItemType($itemType); |
| 552 | 550 | } |
| 553 | - } |
|
| 554 | - else if($template!==null) |
|
| 551 | + } else if($template!==null) |
|
| 555 | 552 | { |
| 556 | 553 | $item=new TRepeaterItem; |
| 557 | 554 | $item->setItemIndex($itemIndex); |
| 558 | 555 | $item->setItemType($itemType); |
| 559 | 556 | $template->instantiateIn($item); |
| 560 | - } |
|
| 561 | - else |
|
| 557 | + } else |
|
| 562 | 558 | $item=null; |
| 563 | 559 | |
| 564 | 560 | return $item; |
@@ -642,8 +638,7 @@ discard block |
||
| 642 | 638 | $items->add($this->createItemInternal($i,$itemType,false,null)); |
| 643 | 639 | } |
| 644 | 640 | $this->_footer=$this->createItemInternal(-1,TListItemType::Footer); |
| 645 | - } |
|
| 646 | - else |
|
| 641 | + } else |
|
| 647 | 642 | $this->createEmptyContent(); |
| 648 | 643 | $this->clearChildState(); |
| 649 | 644 | } |
@@ -704,8 +699,7 @@ discard block |
||
| 704 | 699 | { |
| 705 | 700 | $this->onItemCommand($param); |
| 706 | 701 | return true; |
| 707 | - } |
|
| 708 | - else |
|
| 702 | + } else |
|
| 709 | 703 | return false; |
| 710 | 704 | } |
| 711 | 705 | |
@@ -983,8 +977,7 @@ discard block |
||
| 983 | 977 | { |
| 984 | 978 | $this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param)); |
| 985 | 979 | return true; |
| 986 | - } |
|
| 987 | - else |
|
| 980 | + } else |
|
| 988 | 981 | return false; |
| 989 | 982 | } |
| 990 | 983 | } |
@@ -281,8 +281,7 @@ discard block |
||
| 281 | 281 | { |
| 282 | 282 | $this->_requiresDataBinding=true; |
| 283 | 283 | $this->ensureDataBound(); |
| 284 | - } |
|
| 285 | - else |
|
| 284 | + } else |
|
| 286 | 285 | $this->_requiresDataBinding=$value; |
| 287 | 286 | } |
| 288 | 287 | |
@@ -345,8 +344,7 @@ discard block |
||
| 345 | 344 | $this->setCurrentPageIndex($ds->getCurrentPageIndex()); |
| 346 | 345 | } |
| 347 | 346 | $this->performDataBinding($ds); |
| 348 | - } |
|
| 349 | - else |
|
| 347 | + } else |
|
| 350 | 348 | { |
| 351 | 349 | $this->clearViewState('PageCount'); |
| 352 | 350 | $this->performDataBinding($data); |
@@ -375,8 +373,7 @@ discard block |
||
| 375 | 373 | if($this->_currentViewIsFromDataSourceID=$this->getUsingDataSourceID()) |
| 376 | 374 | $view->attachEventHandler('OnDataSourceViewChanged',array($this,'dataSourceViewChanged')); |
| 377 | 375 | $this->_currentView=$view; |
| 378 | - } |
|
| 379 | - else |
|
| 376 | + } else |
|
| 380 | 377 | $this->_currentView=null; |
| 381 | 378 | $this->_currentViewValid=true; |
| 382 | 379 | } |
@@ -395,8 +392,7 @@ discard block |
||
| 395 | 392 | throw new TInvalidDataValueException('databoundcontrol_datasourceid_invalid',$dsid); |
| 396 | 393 | else |
| 397 | 394 | $this->_currentDataSource=$dataSource; |
| 398 | - } |
|
| 399 | - else if(($dataSource=$this->getDataSource())!==null) |
|
| 395 | + } else if(($dataSource=$this->getDataSource())!==null) |
|
| 400 | 396 | $this->_currentDataSource=new TReadOnlyDataSource($dataSource,$this->getDataMember()); |
| 401 | 397 | else |
| 402 | 398 | $this->_currentDataSource=null; |
@@ -477,14 +473,12 @@ discard block |
||
| 477 | 473 | $list->add(array($value,is_string($key)?$key:$value)); |
| 478 | 474 | } |
| 479 | 475 | return $list; |
| 480 | - } |
|
| 481 | - else if(is_array($value)) |
|
| 476 | + } else if(is_array($value)) |
|
| 482 | 477 | return new TMap($value); |
| 483 | 478 | else if($value instanceof TDbDataReader) { |
| 484 | 479 | // read array from TDbDataReader since it's forward-only stream and can only be traversed once |
| 485 | 480 | return $value->readAll(); |
| 486 | - } |
|
| 487 | - else if(($value instanceof Traversable) || $value===null) |
|
| 481 | + } else if(($value instanceof Traversable) || $value===null) |
|
| 488 | 482 | return $value; |
| 489 | 483 | else |
| 490 | 484 | throw new TInvalidDataTypeException('databoundcontrol_datasource_invalid',get_class($this)); |
@@ -136,15 +136,13 @@ discard block |
||
| 136 | 136 | $activeView=$views->itemAt($index); |
| 137 | 137 | else |
| 138 | 138 | throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id); |
| 139 | - } |
|
| 140 | - else if(($index=$this->getActiveViewIndex())>=0) |
|
| 139 | + } else if(($index=$this->getActiveViewIndex())>=0) |
|
| 141 | 140 | { |
| 142 | 141 | if($index<$views->getCount()) |
| 143 | 142 | $activeView=$views->itemAt($index); |
| 144 | 143 | else |
| 145 | 144 | throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index); |
| 146 | - } |
|
| 147 | - else |
|
| 145 | + } else |
|
| 148 | 146 | { |
| 149 | 147 | foreach($views as $index=>$view) |
| 150 | 148 | { |
@@ -320,8 +318,7 @@ discard block |
||
| 320 | 318 | $this->setActiveViewIndex($index); |
| 321 | 319 | $this->setActiveViewID($view->getID(false)); |
| 322 | 320 | $view->setActive(true); |
| 323 | - } |
|
| 324 | - else |
|
| 321 | + } else |
|
| 325 | 322 | $v->setActive(false); |
| 326 | 323 | } |
| 327 | 324 | } |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | if ($this->sourcepath === NULL) |
| 59 | 59 | { |
| 60 | 60 | $this->sourcepath = $sourcepath; |
| 61 | - } |
|
| 62 | - else |
|
| 61 | + } else |
|
| 63 | 62 | { |
| 64 | 63 | $this->sourcepath->append($sourcepath); |
| 65 | 64 | } |
@@ -270,8 +270,7 @@ discard block |
||
| 270 | 270 | $cell->getControls()->add($listControl); |
| 271 | 271 | $cell->registerObject('DropDownList',$listControl); |
| 272 | 272 | $control=$listControl; |
| 273 | - } |
|
| 274 | - else |
|
| 273 | + } else |
|
| 275 | 274 | $control=$cell; |
| 276 | 275 | $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
| 277 | 276 | break; |
@@ -307,8 +306,7 @@ discard block |
||
| 307 | 306 | $value=$text; |
| 308 | 307 | $formatString=$this->getDataTextFormatString(); |
| 309 | 308 | $text=$this->formatDataValue($formatString,$text); |
| 310 | - } |
|
| 311 | - else |
|
| 309 | + } else |
|
| 312 | 310 | $text=$value; |
| 313 | 311 | if($sender instanceof TTableCell) |
| 314 | 312 | $sender->setText($text); |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | if ($this->sourcepath === NULL) |
| 59 | 59 | { |
| 60 | 60 | $this->sourcepath = $sourcepath; |
| 61 | - } |
|
| 62 | - else |
|
| 61 | + } else |
|
| 63 | 62 | { |
| 64 | 63 | $this->sourcepath->append($sourcepath); |
| 65 | 64 | } |
@@ -323,8 +323,7 @@ discard block |
||
| 323 | 323 | $writer->addAttributes($attributes); |
| 324 | 324 | if($value!==null) |
| 325 | 325 | $attributes->add('value',$value); |
| 326 | - } |
|
| 327 | - else |
|
| 326 | + } else |
|
| 328 | 327 | $onclick=''; |
| 329 | 328 | if($needspan=$this->getSpanNeeded()) |
| 330 | 329 | { |
@@ -338,14 +337,12 @@ discard block |
||
| 338 | 337 | { |
| 339 | 338 | $this->renderLabel($writer,$clientID,$text); |
| 340 | 339 | $this->renderInputTag($writer,$clientID,$onclick); |
| 341 | - } |
|
| 342 | - else |
|
| 340 | + } else |
|
| 343 | 341 | { |
| 344 | 342 | $this->renderInputTag($writer,$clientID,$onclick); |
| 345 | 343 | $this->renderLabel($writer,$clientID,$text); |
| 346 | 344 | } |
| 347 | - } |
|
| 348 | - else |
|
| 345 | + } else |
|
| 349 | 346 | $this->renderInputTag($writer,$clientID,$onclick); |
| 350 | 347 | if($needspan) |
| 351 | 348 | $writer->renderEndTag(); |
@@ -398,8 +398,7 @@ discard block |
||
| 398 | 398 | $this->setPageCount($targetControl->getPageCount()); |
| 399 | 399 | $this->setCurrentPageIndex($targetControl->getCurrentPageIndex()); |
| 400 | 400 | $this->buildPager(); |
| 401 | - } |
|
| 402 | - else |
|
| 401 | + } else |
|
| 403 | 402 | $this->_pageCount=0; |
| 404 | 403 | } |
| 405 | 404 | |
@@ -461,15 +460,13 @@ discard block |
||
| 461 | 460 | $button->setCssClass($this->getButtonCssClass()); |
| 462 | 461 | return $button; |
| 463 | 462 | } |
| 464 | - } |
|
| 465 | - else |
|
| 463 | + } else |
|
| 466 | 464 | { |
| 467 | 465 | if($buttonType===TPagerButtonType::ImageButton) |
| 468 | 466 | { |
| 469 | 467 | $button=new TImageButton; |
| 470 | 468 | $button->setImageUrl($this->getPageImageUrl($text,$commandName)); |
| 471 | - } |
|
| 472 | - else |
|
| 469 | + } else |
|
| 473 | 470 | $button=new TButton; |
| 474 | 471 | if(!$enabled) |
| 475 | 472 | $button->setEnabled(false); |
@@ -524,8 +521,7 @@ discard block |
||
| 524 | 521 | } |
| 525 | 522 | $label=$this->createPagerButton($buttonType,false,$this->getPrevPageText(),self::CMD_PAGE_PREV,''); |
| 526 | 523 | $controls->add($label); |
| 527 | - } |
|
| 528 | - else |
|
| 524 | + } else |
|
| 529 | 525 | { |
| 530 | 526 | if(($text=$this->getFirstPageText())!=='') |
| 531 | 527 | { |
@@ -547,8 +543,7 @@ discard block |
||
| 547 | 543 | $label=$this->createPagerButton($buttonType,false,$text,self::CMD_PAGE_LAST,''); |
| 548 | 544 | $controls->add($label); |
| 549 | 545 | } |
| 550 | - } |
|
| 551 | - else |
|
| 546 | + } else |
|
| 552 | 547 | { |
| 553 | 548 | $button=$this->createPagerButton($buttonType,true,$this->getNextPageText(),self::CMD_PAGE_NEXT,''); |
| 554 | 549 | $controls->add($button); |
@@ -606,8 +601,7 @@ discard block |
||
| 606 | 601 | { |
| 607 | 602 | $label=$this->createPagerButton($buttonType,false,"$i",self::CMD_PAGE,''); |
| 608 | 603 | $controls->add($label); |
| 609 | - } |
|
| 610 | - else |
|
| 604 | + } else |
|
| 611 | 605 | { |
| 612 | 606 | $button=$this->createPagerButton($buttonType,true,"$i",self::CMD_PAGE,"$i"); |
| 613 | 607 | $controls->add($button); |
@@ -684,32 +678,27 @@ discard block |
||
| 684 | 678 | $pageIndex=TPropertyValue::ensureInteger($param->getCommandParameter())-1; |
| 685 | 679 | $this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$pageIndex)); |
| 686 | 680 | return true; |
| 687 | - } |
|
| 688 | - else if(strcasecmp($command,self::CMD_PAGE_NEXT)===0) |
|
| 681 | + } else if(strcasecmp($command,self::CMD_PAGE_NEXT)===0) |
|
| 689 | 682 | { |
| 690 | 683 | $pageIndex=$this->getCurrentPageIndex()+1; |
| 691 | 684 | $this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$pageIndex)); |
| 692 | 685 | return true; |
| 693 | - } |
|
| 694 | - else if(strcasecmp($command,self::CMD_PAGE_PREV)===0) |
|
| 686 | + } else if(strcasecmp($command,self::CMD_PAGE_PREV)===0) |
|
| 695 | 687 | { |
| 696 | 688 | $pageIndex=$this->getCurrentPageIndex()-1; |
| 697 | 689 | $this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$pageIndex)); |
| 698 | 690 | return true; |
| 699 | - } |
|
| 700 | - else if(strcasecmp($command,self::CMD_PAGE_FIRST)===0) |
|
| 691 | + } else if(strcasecmp($command,self::CMD_PAGE_FIRST)===0) |
|
| 701 | 692 | { |
| 702 | 693 | $this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,0)); |
| 703 | 694 | return true; |
| 704 | - } |
|
| 705 | - else if(strcasecmp($command,self::CMD_PAGE_LAST)===0) |
|
| 695 | + } else if(strcasecmp($command,self::CMD_PAGE_LAST)===0) |
|
| 706 | 696 | { |
| 707 | 697 | $this->onPageIndexChanged(new TPagerPageChangedEventParameter($sender,$this->getPageCount()-1)); |
| 708 | 698 | return true; |
| 709 | 699 | } |
| 710 | 700 | return false; |
| 711 | - } |
|
| 712 | - else |
|
| 701 | + } else |
|
| 713 | 702 | return false; |
| 714 | 703 | } |
| 715 | 704 | } |
@@ -98,8 +98,7 @@ |
||
| 98 | 98 | { |
| 99 | 99 | $this->renderLinkButtonHref($writer); |
| 100 | 100 | $this->renderClientControlScript($writer); |
| 101 | - } |
|
| 102 | - else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 101 | + } else if($this->getEnabled()) // in this case, parent will not render 'disabled' |
|
| 103 | 102 | $writer->addAttribute('disabled','disabled'); |
| 104 | 103 | } |
| 105 | 104 | |