@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function getTagName() |
| 39 | 39 | { |
| 40 | - return ($this->_tagName !== null) ? $this->_tagName : ($this->_tagName = $this->getDefaultTagName()); |
|
| 40 | + return ($this->_tagName!==null) ? $this->_tagName : ($this->_tagName=$this->getDefaultTagName()); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -61,6 +61,6 @@ discard block |
||
| 61 | 61 | * @return boolean true if TagName has deviated from the default. |
| 62 | 62 | */ |
| 63 | 63 | public function getIsMutated() { |
| 64 | - return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName(); |
|
| 64 | + return $this->_tagName!==null && $this->_tagName!=$this->getDefaultTagName(); |
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function getTitle() |
| 82 | 82 | { |
| 83 | - return $this->getViewState('Title',''); |
|
| 83 | + return $this->getViewState('Title', ''); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function setTitle($value) |
| 93 | 93 | { |
| 94 | - $this->setViewState('Title',$value,''); |
|
| 94 | + $this->setViewState('Title', $value, ''); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function getBaseUrl() |
| 101 | 101 | { |
| 102 | - return $this->getViewState('BaseUrl',''); |
|
| 102 | + return $this->getViewState('BaseUrl', ''); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function setBaseUrl($url) |
| 109 | 109 | { |
| 110 | - $this->setViewState('BaseUrl',$url,''); |
|
| 110 | + $this->setViewState('BaseUrl', $url, ''); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function getShortcutIcon() |
| 117 | 117 | { |
| 118 | - return $this->getViewState('ShortcutIcon',''); |
|
| 118 | + return $this->getViewState('ShortcutIcon', ''); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function setShortcutIcon($url) |
| 125 | 125 | { |
| 126 | - $this->setViewState('ShortcutIcon',$url,''); |
|
| 126 | + $this->setViewState('ShortcutIcon', $url, ''); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -131,10 +131,10 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function getMetaTags() |
| 133 | 133 | { |
| 134 | - if(($metaTags=$this->getViewState('MetaTags',null))===null) |
|
| 134 | + if(($metaTags=$this->getViewState('MetaTags', null))===null) |
|
| 135 | 135 | { |
| 136 | 136 | $metaTags=new TMetaTagCollection; |
| 137 | - $this->setViewState('MetaTags',$metaTags,null); |
|
| 137 | + $this->setViewState('MetaTags', $metaTags, null); |
|
| 138 | 138 | } |
| 139 | 139 | return $metaTags; |
| 140 | 140 | } |
@@ -297,14 +297,14 @@ discard block |
||
| 297 | 297 | public function render($writer) |
| 298 | 298 | { |
| 299 | 299 | if($this->_id!=='') |
| 300 | - $writer->addAttribute('id',$this->_id); |
|
| 300 | + $writer->addAttribute('id', $this->_id); |
|
| 301 | 301 | if($this->_name!=='') |
| 302 | - $writer->addAttribute('name',$this->_name); |
|
| 302 | + $writer->addAttribute('name', $this->_name); |
|
| 303 | 303 | if($this->_httpEquiv!=='') |
| 304 | - $writer->addAttribute('http-equiv',$this->_httpEquiv); |
|
| 304 | + $writer->addAttribute('http-equiv', $this->_httpEquiv); |
|
| 305 | 305 | if($this->_scheme!=='') |
| 306 | - $writer->addAttribute('scheme',$this->_scheme); |
|
| 307 | - $writer->addAttribute('content',$this->_content); |
|
| 306 | + $writer->addAttribute('scheme', $this->_scheme); |
|
| 307 | + $writer->addAttribute('content', $this->_content); |
|
| 308 | 308 | $writer->renderBeginTag('meta'); |
| 309 | 309 | $writer->renderEndTag(); |
| 310 | 310 | } |
@@ -331,10 +331,10 @@ discard block |
||
| 331 | 331 | * @param mixed new item |
| 332 | 332 | * @throws TInvalidDataTypeException if the item to be inserted is not a {@link TMetaTag} |
| 333 | 333 | */ |
| 334 | - public function insertAt($index,$item) |
|
| 334 | + public function insertAt($index, $item) |
|
| 335 | 335 | { |
| 336 | 336 | if($item instanceof TMetaTag) |
| 337 | - parent::insertAt($index,$item); |
|
| 337 | + parent::insertAt($index, $item); |
|
| 338 | 338 | else |
| 339 | 339 | throw new TInvalidDataTypeException('metatagcollection_metatag_invalid'); |
| 340 | 340 | } |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | */ |
| 364 | 364 | public function findMetaTagByID($id) |
| 365 | 365 | { |
| 366 | - if(($index=$this->findIndexByID($id))>=0) |
|
| 366 | + if(($index=$this->findIndexByID($id)) >= 0) |
|
| 367 | 367 | return $this->itemAt($index); |
| 368 | 368 | else |
| 369 | 369 | return null; |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | { |
| 40 | 40 | if(($id=$this->getID())==='') |
| 41 | 41 | throw new TConfigurationException('contentplaceholder_id_required'); |
| 42 | - $this->getTemplateControl()->registerContentPlaceHolder($id,$this); |
|
| 42 | + $this->getTemplateControl()->registerContentPlaceHolder($id, $this); |
|
| 43 | 43 | $parent->getControls()->add($this); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function getMediaType() |
| 51 | 51 | { |
| 52 | - return $this->getViewState('MediaType',''); |
|
| 52 | + return $this->getViewState('MediaType', ''); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function setMediaType($value) |
| 59 | 59 | { |
| 60 | - $this->setViewState('MediaType',$value,''); |
|
| 60 | + $this->setViewState('MediaType', $value, ''); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | public function onPreRender($param) |
| 69 | 69 | { |
| 70 | 70 | if(($url=$this->getStyleSheetUrl())!=='') |
| 71 | - $this->getPage()->getClientScript()->registerStyleSheetFile($url,$url,$this->getMediaType()); |
|
| 71 | + $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url, $this->getMediaType()); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function addParsedObject($object) |
| 44 | 44 | { |
| 45 | 45 | if(is_string($object)) |
| 46 | - $object=html_entity_decode($object,ENT_QUOTES,'UTF-8'); |
|
| 46 | + $object=html_entity_decode($object, ENT_QUOTES, 'UTF-8'); |
|
| 47 | 47 | parent::addParsedObject($object); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function getText() |
| 54 | 54 | { |
| 55 | - return $this->getViewState('Text',''); |
|
| 55 | + return $this->getViewState('Text', ''); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function setText($value) |
| 62 | 62 | { |
| 63 | - $this->setViewState('Text',$value); |
|
| 63 | + $this->setViewState('Text', $value); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | if(($text=$this->getText())==='' && $this->getHasControls()) |
| 75 | 75 | { |
| 76 | - $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
|
| 76 | + $htmlWriter=Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
|
| 77 | 77 | parent::renderContents($htmlWriter); |
| 78 | 78 | $text=$htmlWriter->flush(); |
| 79 | 79 | } |
@@ -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 | |
@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TWebControlDecorator class file. |
|
| 4 | - * |
|
| 5 | - * @author Brad Anderson <[email protected]> |
|
| 6 | - * @link https://github.com/pradosoft/prado |
|
| 7 | - * @copyright Copyright © 2005-2015 The PRADO Group |
|
| 8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | - * @package System.Web.UI.WebControls |
|
| 10 | - */ |
|
| 3 | + * TWebControlDecorator class file. |
|
| 4 | + * |
|
| 5 | + * @author Brad Anderson <[email protected]> |
|
| 6 | + * @link https://github.com/pradosoft/prado |
|
| 7 | + * @copyright Copyright © 2005-2015 The PRADO Group |
|
| 8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
| 9 | + * @package System.Web.UI.WebControls |
|
| 10 | + */ |
|
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | /** |
@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function setRepackUTF7($value) |
| 47 | 47 | { |
| 48 | - $this->setViewState('RepackUTF7',TPropertyValue::ensureBoolean($value),false); |
|
| 48 | + $this->setViewState('RepackUTF7', TPropertyValue::ensureBoolean($value), false); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function getRepackUTF7() |
| 55 | 55 | { |
| 56 | - return $this->getViewState('RepackUTF7',false); |
|
| 56 | + return $this->getViewState('RepackUTF7', false); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function render($writer) |
| 66 | 66 | { |
| 67 | - $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
|
| 67 | + $htmlWriter=Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
|
| 68 | 68 | parent::render($htmlWriter); |
| 69 | 69 | $writer->write($this->parseSafeHtml($htmlWriter->flush())); |
| 70 | 70 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | protected function parseSafeHtml($text) |
| 78 | 78 | { |
| 79 | - $renderer = Prado::createComponent('System.3rdParty.SafeHtml.TSafeHtmlParser'); |
|
| 79 | + $renderer=Prado::createComponent('System.3rdParty.SafeHtml.TSafeHtmlParser'); |
|
| 80 | 80 | return $renderer->parse($text, $this->getRepackUTF7()); |
| 81 | 81 | } |
| 82 | 82 | } |
@@ -54,16 +54,16 @@ discard block |
||
| 54 | 54 | protected function __getZappableSleepProps(&$exprops) |
| 55 | 55 | { |
| 56 | 56 | parent::__getZappableSleepProps($exprops); |
| 57 | - if ($this->_backImageUrl===null) |
|
| 58 | - $exprops[] = "\0TPanelStyle\0_backImageUrl"; |
|
| 59 | - if ($this->_direction===null) |
|
| 60 | - $exprops[] = "\0TPanelStyle\0_direction"; |
|
| 61 | - if ($this->_horizontalAlign===null) |
|
| 62 | - $exprops[] = "\0TPanelStyle\0_horizontalAlign"; |
|
| 63 | - if ($this->_scrollBars===null) |
|
| 64 | - $exprops[] = "\0TPanelStyle\0_scrollBars"; |
|
| 65 | - if ($this->_wrap===null) |
|
| 66 | - $exprops[] = "\0TPanelStyle\0_wrap"; |
|
| 57 | + if($this->_backImageUrl===null) |
|
| 58 | + $exprops[]="\0TPanelStyle\0_backImageUrl"; |
|
| 59 | + if($this->_direction===null) |
|
| 60 | + $exprops[]="\0TPanelStyle\0_direction"; |
|
| 61 | + if($this->_horizontalAlign===null) |
|
| 62 | + $exprops[]="\0TPanelStyle\0_horizontalAlign"; |
|
| 63 | + if($this->_scrollBars===null) |
|
| 64 | + $exprops[]="\0TPanelStyle\0_scrollBars"; |
|
| 65 | + if($this->_wrap===null) |
|
| 66 | + $exprops[]="\0TPanelStyle\0_wrap"; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -74,28 +74,28 @@ discard block |
||
| 74 | 74 | public function addAttributesToRender($writer) |
| 75 | 75 | { |
| 76 | 76 | if(($url=trim($this->getBackImageUrl()))!=='') |
| 77 | - $this->setStyleField('background-image','url('.$url.')'); |
|
| 77 | + $this->setStyleField('background-image', 'url('.$url.')'); |
|
| 78 | 78 | |
| 79 | 79 | switch($this->getScrollBars()) |
| 80 | 80 | { |
| 81 | - case TScrollBars::Horizontal: $this->setStyleField('overflow-x','scroll'); break; |
|
| 82 | - case TScrollBars::Vertical: $this->setStyleField('overflow-y','scroll'); break; |
|
| 83 | - case TScrollBars::Both: $this->setStyleField('overflow','scroll'); break; |
|
| 84 | - case TScrollBars::Auto: $this->setStyleField('overflow','auto'); break; |
|
| 81 | + case TScrollBars::Horizontal: $this->setStyleField('overflow-x', 'scroll'); break; |
|
| 82 | + case TScrollBars::Vertical: $this->setStyleField('overflow-y', 'scroll'); break; |
|
| 83 | + case TScrollBars::Both: $this->setStyleField('overflow', 'scroll'); break; |
|
| 84 | + case TScrollBars::Auto: $this->setStyleField('overflow', 'auto'); break; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if(($align=$this->getHorizontalAlign())!==THorizontalAlign::NotSet) |
| 88 | - $this->setStyleField('text-align',strtolower($align)); |
|
| 88 | + $this->setStyleField('text-align', strtolower($align)); |
|
| 89 | 89 | |
| 90 | 90 | if(!$this->getWrap()) |
| 91 | - $this->setStyleField('white-space','nowrap'); |
|
| 91 | + $this->setStyleField('white-space', 'nowrap'); |
|
| 92 | 92 | |
| 93 | 93 | if(($direction=$this->getDirection())!==TContentDirection::NotSet) |
| 94 | 94 | { |
| 95 | 95 | if($direction===TContentDirection::LeftToRight) |
| 96 | - $this->setStyleField('direction','ltr'); |
|
| 96 | + $this->setStyleField('direction', 'ltr'); |
|
| 97 | 97 | else |
| 98 | - $this->setStyleField('direction','rtl'); |
|
| 98 | + $this->setStyleField('direction', 'rtl'); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | parent::addAttributesToRender($writer); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public function getBackImageUrl() |
| 108 | 108 | { |
| 109 | - return $this->_backImageUrl===null?'':$this->_backImageUrl; |
|
| 109 | + return $this->_backImageUrl===null ? '' : $this->_backImageUrl; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function getDirection() |
| 125 | 125 | { |
| 126 | - return $this->_direction===null?TContentDirection::NotSet:$this->_direction; |
|
| 126 | + return $this->_direction===null ? TContentDirection::NotSet : $this->_direction; |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function setDirection($value) |
| 133 | 133 | { |
| 134 | - $this->_direction=TPropertyValue::ensureEnum($value,'TContentDirection'); |
|
| 134 | + $this->_direction=TPropertyValue::ensureEnum($value, 'TContentDirection'); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function getWrap() |
| 141 | 141 | { |
| 142 | - return $this->_wrap===null?true:$this->_wrap; |
|
| 142 | + return $this->_wrap===null ? true : $this->_wrap; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function getHorizontalAlign() |
| 158 | 158 | { |
| 159 | - return $this->_horizontalAlign===null?THorizontalAlign::NotSet:$this->_horizontalAlign; |
|
| 159 | + return $this->_horizontalAlign===null ? THorizontalAlign::NotSet : $this->_horizontalAlign; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public function setHorizontalAlign($value) |
| 167 | 167 | { |
| 168 | - $this->_horizontalAlign=TPropertyValue::ensureEnum($value,'THorizontalAlign'); |
|
| 168 | + $this->_horizontalAlign=TPropertyValue::ensureEnum($value, 'THorizontalAlign'); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function getScrollBars() |
| 175 | 175 | { |
| 176 | - return $this->_scrollBars===null?TScrollBars::None:$this->_scrollBars; |
|
| 176 | + return $this->_scrollBars===null ? TScrollBars::None : $this->_scrollBars; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | */ |
| 182 | 182 | public function setScrollBars($value) |
| 183 | 183 | { |
| 184 | - $this->_scrollBars=TPropertyValue::ensureEnum($value,'TScrollBars'); |
|
| 184 | + $this->_scrollBars=TPropertyValue::ensureEnum($value, 'TScrollBars'); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |