@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function createChildControls() |
| 45 | 45 | { |
| 46 | - if(null === ($_template = $this->getTemplate())) { |
|
| 46 | + if(null===($_template=$this->getTemplate())) { |
|
| 47 | 47 | return $this->doCreateChildControlsFor(get_class($this)); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function doCreateChildControlsFor($parentClass) |
| 68 | 68 | { |
| 69 | - if(false !== ($_parentClass = get_parent_class($parentClass)) && 'TTemplateControl' != $_parentClass) { |
|
| 69 | + if(false!==($_parentClass=get_parent_class($parentClass)) && 'TTemplateControl'!=$_parentClass) { |
|
| 70 | 70 | $this->doCreateChildControlsFor($_parentClass); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function doTemplateForClass($parentClass) |
| 84 | 84 | { |
| 85 | - if(null !== ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) { |
|
| 85 | + if(null!==($_template=$this->getService()->getTemplateManager()->getTemplateByClassName($parentClass))) { |
|
| 86 | 86 | foreach($_template->getDirective() as $_name => $_value) { |
| 87 | 87 | if(!is_string($_value)) { |
| 88 | 88 | throw new TConfigurationException('templatecontrol_directive_invalid', get_class(this), $_name); |
@@ -105,11 +105,11 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | public function getIsSourceTemplateControl() |
| 107 | 107 | { |
| 108 | - if(null !== ($_template = $this->getTemplate())) { |
|
| 108 | + if(null!==($_template=$this->getTemplate())) { |
|
| 109 | 109 | return $_template->getIsSourceTemplate(); |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - return ($_template = $this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this))) |
|
| 112 | + return ($_template=$this->getService()->getTemplateManager()->getTemplateByClassName(get_parent_class($this))) |
|
| 113 | 113 | ? $_template->getIsSourceTemplate() |
| 114 | 114 | : false; |
| 115 | 115 | } |
@@ -86,12 +86,12 @@ |
||
| 86 | 86 | else |
| 87 | 87 | { |
| 88 | 88 | $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
| 89 | - if ($this->getHasControls()) |
|
| 89 | + if($this->getHasControls()) |
|
| 90 | 90 | { |
| 91 | 91 | // If we update a TActivePanel on callback, |
| 92 | 92 | // We shouldn't update all childs, because the whole content will be replaced by |
| 93 | 93 | // the parent |
| 94 | - foreach ($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) |
|
| 94 | + foreach($this->findControlsByType('Prado\Web\UI\ActiveControls\IActiveControl', false) as $control) |
|
| 95 | 95 | { |
| 96 | 96 | $control->getActiveControl()->setEnableUpdate(false); |
| 97 | 97 | } |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function setReadOnly($value) |
| 84 | 84 | { |
| 85 | - if(parent::getReadOnly() === $value) |
|
| 85 | + if(parent::getReadOnly()===$value) |
|
| 86 | 86 | return; |
| 87 | 87 | |
| 88 | 88 | parent::setReadOnly($value); |
| 89 | - $value = $this->getReadOnly(); |
|
| 89 | + $value=$this->getReadOnly(); |
|
| 90 | 90 | $this->callClientFunction('setReadOnly', $value); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -95,11 +95,11 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function setRating($value) |
| 97 | 97 | { |
| 98 | - if(parent::getRating() === $value) |
|
| 98 | + if(parent::getRating()===$value) |
|
| 99 | 99 | return; |
| 100 | 100 | |
| 101 | 101 | parent::setRating($value); |
| 102 | - $value = $this->getRating(); |
|
| 102 | + $value=$this->getRating(); |
|
| 103 | 103 | $this->callClientFunction('setRating', $value); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | if($this->getActiveControl()->canUpdateClientSide()) |
| 114 | 114 | { |
| 115 | - $client = $this->getPage()->getCallbackClient(); |
|
| 116 | - $code = 'Prado.Registry[\'' . $this->ClientID . '\'].' . $func . '(' . $value . ')'; |
|
| 115 | + $client=$this->getPage()->getCallbackClient(); |
|
| 116 | + $code='Prado.Registry[\''.$this->ClientID.'\'].'.$func.'('.$value.')'; |
|
| 117 | 117 | $client->evaluateScript($code, [$value]); |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function setCaption($value) |
| 125 | 125 | { |
| 126 | - if(parent::getCaption() === $value) |
|
| 126 | + if(parent::getCaption()===$value) |
|
| 127 | 127 | return; |
| 128 | 128 | |
| 129 | 129 | parent::setCaption($value); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function setText($value) |
| 101 | 101 | { |
| 102 | - if(parent::getText() === $value) |
|
| 102 | + if(parent::getText()===$value) |
|
| 103 | 103 | return; |
| 104 | 104 | |
| 105 | 105 | parent::setText($value); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function setEnabled($value) |
| 140 | 140 | { |
| 141 | - if(parent::getEnabled() === $value) |
|
| 141 | + if(parent::getEnabled()===$value) |
|
| 142 | 142 | return; |
| 143 | 143 | |
| 144 | 144 | parent::setEnabled($value); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | if($this->getEnabled(true)) |
| 148 | 148 | { |
| 149 | - $nop = "javascript:;//" . $this->getClientID(); |
|
| 149 | + $nop="javascript:;//".$this->getClientID(); |
|
| 150 | 150 | $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop); |
| 151 | 151 | |
| 152 | 152 | $this->getActiveControl()->registerCallbackClientScript( |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | */ |
| 67 | 67 | public function setText($value) |
| 68 | 68 | { |
| 69 | - if(parent::getText() === $value) |
|
| 69 | + if(parent::getText()===$value) |
|
| 70 | 70 | return; |
| 71 | 71 | |
| 72 | 72 | parent::setText($value); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public function __construct() |
| 42 | 42 | { |
| 43 | 43 | parent::__construct(); |
| 44 | - $this->_boundary = sprintf('%x', crc32(uniqid(null, true))); |
|
| 44 | + $this->_boundary=sprintf('%x', crc32(uniqid(null, true))); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function setBoundary($value) |
| 59 | 59 | { |
| 60 | - $this->_boundary = $value; |
|
| 60 | + $this->_boundary=$value; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -67,9 +67,9 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function flush() |
| 69 | 69 | { |
| 70 | - $content = parent::flush(); |
|
| 70 | + $content=parent::flush(); |
|
| 71 | 71 | if(empty($content)) |
| 72 | 72 | return ""; |
| 73 | - return '<!--' . $this->getBoundary() . '-->' . $content . '<!--//' . $this->getBoundary() . '-->'; |
|
| 73 | + return '<!--'.$this->getBoundary().'-->'.$content.'<!--//'.$this->getBoundary().'-->'; |
|
| 74 | 74 | } |
| 75 | 75 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function setAlternateText($value) |
| 50 | 50 | { |
| 51 | - if(parent::getAlternateText() === $value) |
|
| 51 | + if(parent::getAlternateText()===$value) |
|
| 52 | 52 | return; |
| 53 | 53 | |
| 54 | 54 | parent::setAlternateText($value); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function setImageAlign($value) |
| 67 | 67 | { |
| 68 | - if(parent::getImageAlign() === $value) |
|
| 68 | + if(parent::getImageAlign()===$value) |
|
| 69 | 69 | return; |
| 70 | 70 | |
| 71 | 71 | parent::setImageAlign($value); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function setImageUrl($value) |
| 80 | 80 | { |
| 81 | - if(parent::getImageUrl() === $value) |
|
| 81 | + if(parent::getImageUrl()===$value) |
|
| 82 | 82 | return; |
| 83 | 83 | |
| 84 | 84 | parent::setImageUrl($value); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function setDescriptionUrl($value) |
| 93 | 93 | { |
| 94 | - if(parent::getDescriptionUrl() === $value) |
|
| 94 | + if(parent::getDescriptionUrl()===$value) |
|
| 95 | 95 | return; |
| 96 | 96 | |
| 97 | 97 | parent::setDescriptionUrl($value); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | public function setValue($value) |
| 62 | 62 | { |
| 63 | - if(parent::getValue() === $value) |
|
| 63 | + if(parent::getValue()===$value) |
|
| 64 | 64 | return; |
| 65 | 65 | |
| 66 | 66 | parent::setValue($value); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | protected function getContainerID() |
| 59 | 59 | { |
| 60 | - return $this->ClientID . '_Container'; |
|
| 60 | + return $this->ClientID.'_Container'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |