@@ -113,6 +113,7 @@ |
||
113 | 113 | |
114 | 114 | /** |
115 | 115 | * @param string button caption |
116 | + * @param string $value |
|
116 | 117 | */ |
117 | 118 | public function setButtonText($value) |
118 | 119 | { |
@@ -124,9 +124,9 @@ |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * Sets the date format for a date validation |
|
128 | - * @param string the date format value |
|
129 | - */ |
|
127 | + * Sets the date format for a date validation |
|
128 | + * @param string the date format value |
|
129 | + */ |
|
130 | 130 | public function setDateFormat($value) |
131 | 131 | { |
132 | 132 | $this->setViewState('DateFormat', $value, ''); |
@@ -70,8 +70,7 @@ |
||
70 | 70 | { |
71 | 71 | $domain=substr($value,$pos+1); |
72 | 72 | return $domain===''?false:checkdnsrr($domain,'MX'); |
73 | - } |
|
74 | - else |
|
73 | + } else |
|
75 | 74 | return false; |
76 | 75 | } |
77 | 76 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | public function getDataType() |
50 | 50 | { |
51 | - return $this->getViewState('DataType','String'); |
|
51 | + return $this->getViewState('DataType', 'String'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function setDataType($value) |
59 | 59 | { |
60 | - $this->setViewState('DataType',TPropertyValue::ensureEnum($value,'Prado\\Web\\UI\\WebControls\\TValidationDataType'),TValidationDataType::String); |
|
60 | + $this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'Prado\\Web\\UI\\WebControls\\TValidationDataType'), TValidationDataType::String); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | switch($this->getDataType()) |
92 | 92 | { |
93 | 93 | case TValidationDataType::Integer: |
94 | - return preg_match('/^[-+]?[0-9]+$/',trim($value)); |
|
94 | + return preg_match('/^[-+]?[0-9]+$/', trim($value)); |
|
95 | 95 | case TValidationDataType::Float: |
96 | - return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/',trim($value)); |
|
96 | + return preg_match('/^[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?$/', trim($value)); |
|
97 | 97 | case TValidationDataType::Date: |
98 | - $dateFormat = $this->getDateFormat(); |
|
98 | + $dateFormat=$this->getDateFormat(); |
|
99 | 99 | if(strlen($dateFormat)) |
100 | 100 | { |
101 | - $formatter = Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter',$dateFormat); |
|
101 | + $formatter=Prado::createComponent('\\Prado\\Util\\TSimpleDateFormatter', $dateFormat); |
|
102 | 102 | return $formatter->isValidDate($value); |
103 | 103 | } |
104 | 104 | else |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | protected function getClientScriptOptions() |
115 | 115 | { |
116 | - $options = parent::getClientScriptOptions(); |
|
116 | + $options=parent::getClientScriptOptions(); |
|
117 | 117 | $options['DataType']=$this->getDataType(); |
118 | 118 | if(($dateFormat=$this->getDateFormat())!=='') |
119 | 119 | $options['DateFormat']=$dateFormat; |
@@ -213,7 +213,7 @@ |
||
213 | 213 | /** |
214 | 214 | * Returns the value to be validated. |
215 | 215 | * This methid is required by IValidatable interface. |
216 | - * @return mixed the value of the property to be validated. |
|
216 | + * @return string the value of the property to be validated. |
|
217 | 217 | */ |
218 | 218 | public function getValidationPropertyValue() |
219 | 219 | { |
@@ -463,14 +463,14 @@ |
||
463 | 463 | */ |
464 | 464 | public function getIsValid() |
465 | 465 | { |
466 | - return $this->_isValid; |
|
466 | + return $this->_isValid; |
|
467 | 467 | } |
468 | 468 | /** |
469 | 469 | * @param bool wether this control is valid. |
470 | 470 | */ |
471 | 471 | public function setIsValid($value) |
472 | 472 | { |
473 | - $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
473 | + $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
474 | 474 | } |
475 | 475 | |
476 | 476 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | protected function addAttributesToRender($writer) |
54 | 54 | { |
55 | - $writer->addAttribute('name',$this->getUniqueID()); |
|
55 | + $writer->addAttribute('name', $this->getUniqueID()); |
|
56 | 56 | parent::addAttributesToRender($writer); |
57 | 57 | } |
58 | 58 | |
@@ -73,15 +73,15 @@ discard block |
||
73 | 73 | * @param array the input data collection |
74 | 74 | * @return boolean whether the data of the component has been changed |
75 | 75 | */ |
76 | - public function loadPostData($key,$values) |
|
76 | + public function loadPostData($key, $values) |
|
77 | 77 | { |
78 | 78 | if(!$this->getEnabled(true)) |
79 | 79 | return false; |
80 | 80 | $this->ensureDataBound(); |
81 | - $selection=isset($values[$key])?$values[$key]:null; |
|
81 | + $selection=isset($values[$key]) ? $values[$key] : null; |
|
82 | 82 | if($selection!==null) |
83 | 83 | { |
84 | - $index=$this->getItems()->findIndexByValue($selection,false); |
|
84 | + $index=$this->getItems()->findIndexByValue($selection, false); |
|
85 | 85 | if($this->getSelectedIndex()!==$index) |
86 | 86 | { |
87 | 87 | $this->setSelectedIndex($index); |
@@ -213,7 +213,7 @@ |
||
213 | 213 | /** |
214 | 214 | * Returns the value to be validated. |
215 | 215 | * This methid is required by IValidatable interface. |
216 | - * @return mixed the value of the property to be validated. |
|
216 | + * @return string the value of the property to be validated. |
|
217 | 217 | */ |
218 | 218 | public function getValidationPropertyValue() |
219 | 219 | { |
@@ -463,14 +463,14 @@ |
||
463 | 463 | */ |
464 | 464 | public function getIsValid() |
465 | 465 | { |
466 | - return $this->_isValid; |
|
466 | + return $this->_isValid; |
|
467 | 467 | } |
468 | 468 | /** |
469 | 469 | * @param bool wether this control is valid. |
470 | 470 | */ |
471 | 471 | public function setIsValid($value) |
472 | 472 | { |
473 | - $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
473 | + $this->_isValid=TPropertyValue::ensureBoolean($value); |
|
474 | 474 | } |
475 | 475 | |
476 | 476 | /** |
@@ -53,18 +53,18 @@ discard block |
||
53 | 53 | { |
54 | 54 | $uniqueID=$this->getUniqueID(); |
55 | 55 | $this->getPage()->ensureRenderInForm($this); |
56 | - $writer->addAttribute('type','hidden'); |
|
56 | + $writer->addAttribute('type', 'hidden'); |
|
57 | 57 | if($uniqueID!=='') |
58 | - $writer->addAttribute('name',$uniqueID); |
|
58 | + $writer->addAttribute('name', $uniqueID); |
|
59 | 59 | if($this->getID()!=='') |
60 | - $writer->addAttribute('id',$this->getClientID()); |
|
60 | + $writer->addAttribute('id', $this->getClientID()); |
|
61 | 61 | if(($value=$this->getValue())!=='') |
62 | - $writer->addAttribute('value',$value); |
|
62 | + $writer->addAttribute('value', $value); |
|
63 | 63 | |
64 | 64 | if($this->getHasAttributes()) |
65 | 65 | { |
66 | 66 | foreach($this->getAttributes() as $name=>$value) |
67 | - $writer->addAttribute($name,$value); |
|
67 | + $writer->addAttribute($name, $value); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $writer->renderBeginTag('input'); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @param array the input data collection |
79 | 79 | * @return boolean whether the data of the component has been changed |
80 | 80 | */ |
81 | - public function loadPostData($key,$values) |
|
81 | + public function loadPostData($key, $values) |
|
82 | 82 | { |
83 | 83 | $value=$values[$key]; |
84 | 84 | if($value===$this->getValue()) |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function onValueChanged($param) |
148 | 148 | { |
149 | - $this->raiseEvent('OnValueChanged',$this,$param); |
|
149 | + $this->raiseEvent('OnValueChanged', $this, $param); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function getValue() |
156 | 156 | { |
157 | - return $this->getViewState('Value',''); |
|
157 | + return $this->getViewState('Value', ''); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function setValue($value) |
165 | 165 | { |
166 | - $this->setViewState('Value',$value,''); |
|
166 | + $this->setViewState('Value', $value, ''); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -120,11 +120,11 @@ discard block |
||
120 | 120 | } |
121 | 121 | } |
122 | 122 | |
123 | - /** |
|
124 | - * Clears all existing selections on the client side. |
|
125 | - */ |
|
126 | - public function clearSelection() |
|
127 | - { |
|
123 | + /** |
|
124 | + * Clears all existing selections on the client side. |
|
125 | + */ |
|
126 | + public function clearSelection() |
|
127 | + { |
|
128 | 128 | if($this->canUpdateClientSide()) |
129 | 129 | { |
130 | 130 | $this->updateListItems(); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $this->getPage()->getCallbackClient()->select($this->getControl(), 'Clear'); |
138 | 138 | } |
139 | 139 | } |
140 | - } |
|
140 | + } |
|
141 | 141 | |
142 | 142 | /** |
143 | 143 | * Update the client-side list options. |
@@ -70,20 +70,20 @@ discard block |
||
70 | 70 | if($this->canUpdateClientSide()) |
71 | 71 | { |
72 | 72 | $this->updateListItems(); |
73 | - $n = $this->getControl()->getItemCount(); |
|
73 | + $n=$this->getControl()->getItemCount(); |
|
74 | 74 | |
75 | 75 | $promptValue=$this->getControl()->getPromptValue(); |
76 | 76 | if($promptValue==='') |
77 | 77 | $promptValue=$this->getControl()->getPromptText(); |
78 | 78 | |
79 | - $list = array(); |
|
79 | + $list=array(); |
|
80 | 80 | foreach($indices as $index) |
81 | 81 | { |
82 | - $index = intval($index); |
|
82 | + $index=intval($index); |
|
83 | 83 | if($promptValue!=='') |
84 | 84 | $index++; |
85 | 85 | if($index >= 0 && $index <= $n) |
86 | - $list[] = $index; |
|
86 | + $list[]=$index; |
|
87 | 87 | } |
88 | 88 | if(count($list) > 0) |
89 | 89 | $this->getPage()->getCallbackClient()->select( |
@@ -114,9 +114,9 @@ discard block |
||
114 | 114 | if($this->canUpdateClientSide()) |
115 | 115 | { |
116 | 116 | $this->updateListItems(); |
117 | - $list = array(); |
|
117 | + $list=array(); |
|
118 | 118 | foreach($values as $value) |
119 | - $list[] = $value; |
|
119 | + $list[]=$value; |
|
120 | 120 | if(count($list) > 0) |
121 | 121 | $this->getPage()->getCallbackClient()->select( |
122 | 122 | $this->getControl(), 'Values', $list); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | { |
150 | 150 | if($this->canUpdateClientSide()) |
151 | 151 | { |
152 | - $items = $this->getControl()->getItems(); |
|
152 | + $items=$this->getControl()->getItems(); |
|
153 | 153 | if($items instanceof TActiveListItemCollection |
154 | 154 | && $items->getListHasChanged()) |
155 | 155 | { |
@@ -173,15 +173,15 @@ |
||
173 | 173 | { |
174 | 174 | if(($forControl=$this->getForControl())==='') |
175 | 175 | throw new TConfigurationException('keyboard_forcontrol_required'); |
176 | - if(($target=$this->findControl($forControl))===null) |
|
177 | - throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl); |
|
176 | + if(($target=$this->findControl($forControl))===null) |
|
177 | + throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl); |
|
178 | 178 | |
179 | - $options['ID'] = $this->getClientID(); |
|
180 | - $options['ForControl'] = $target->getClientID(); |
|
181 | - $options['AutoHide'] = $this->getAutoHide(); |
|
182 | - $options['CssClass'] = $this->getKeyboardCssClass(); |
|
179 | + $options['ID'] = $this->getClientID(); |
|
180 | + $options['ForControl'] = $target->getClientID(); |
|
181 | + $options['AutoHide'] = $this->getAutoHide(); |
|
182 | + $options['CssClass'] = $this->getKeyboardCssClass(); |
|
183 | 183 | |
184 | - return $options; |
|
184 | + return $options; |
|
185 | 185 | } |
186 | 186 | } |
187 | 187 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function getForControl() |
44 | 44 | { |
45 | - return $this->getViewState('ForControl',''); |
|
45 | + return $this->getViewState('ForControl', ''); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | parent::addAttributesToRender($writer); |
133 | 133 | if($this->getPage()->getClientSupportsJavaScript()) |
134 | - $writer->addAttribute('id',$this->getClientID()); |
|
134 | + $writer->addAttribute('id', $this->getClientID()); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | { |
144 | 144 | if(($url=$this->getCssUrl())==='') |
145 | 145 | $url=$this->getApplication()->getAssetManager()->publishFilePath(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets'.DIRECTORY_SEPARATOR.'keyboard.css'); |
146 | - $this->getPage()->getClientScript()->registerStyleSheetFile($url,$url); |
|
146 | + $this->getPage()->getClientScript()->registerStyleSheetFile($url, $url); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -174,12 +174,12 @@ discard block |
||
174 | 174 | if(($forControl=$this->getForControl())==='') |
175 | 175 | throw new TConfigurationException('keyboard_forcontrol_required'); |
176 | 176 | if(($target=$this->findControl($forControl))===null) |
177 | - throw new TConfigurationException('keyboard_forcontrol_invalid',$forControl); |
|
177 | + throw new TConfigurationException('keyboard_forcontrol_invalid', $forControl); |
|
178 | 178 | |
179 | - $options['ID'] = $this->getClientID(); |
|
180 | - $options['ForControl'] = $target->getClientID(); |
|
181 | - $options['AutoHide'] = $this->getAutoHide(); |
|
182 | - $options['CssClass'] = $this->getKeyboardCssClass(); |
|
179 | + $options['ID']=$this->getClientID(); |
|
180 | + $options['ForControl']=$target->getClientID(); |
|
181 | + $options['AutoHide']=$this->getAutoHide(); |
|
182 | + $options['CssClass']=$this->getKeyboardCssClass(); |
|
183 | 183 | |
184 | 184 | return $options; |
185 | 185 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Sets the horizontal alignment of the contents within the table item. |
92 | - * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
|
92 | + * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
|
93 | 93 | * @param string the horizontal alignment |
94 | 94 | */ |
95 | 95 | public function setHorizontalAlign($value) |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | /** |
112 | 112 | * Sets the vertical alignment of the contents within the table item. |
113 | - * Valid values include 'NotSet','Top','Bottom','Middle' |
|
113 | + * Valid values include 'NotSet','Top','Bottom','Middle' |
|
114 | 114 | * @param string the horizontal alignment |
115 | 115 | */ |
116 | 116 | public function setVerticalAlign($value) |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function getText() |
153 | 153 | { |
154 | - return $this->getViewState('Text',''); |
|
154 | + return $this->getViewState('Text', ''); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function setText($value) |
163 | 163 | { |
164 | - $this->setViewState('Text',$value,''); |
|
164 | + $this->setViewState('Text', $value, ''); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | protected function addAttributesToRender($writer) |
198 | 198 | { |
199 | 199 | parent::addAttributesToRender($writer); |
200 | - if(($colspan=$this->getColumnSpan())>0) |
|
201 | - $writer->addAttribute('colspan',"$colspan"); |
|
202 | - if(($rowspan=$this->getRowSpan())>0) |
|
203 | - $writer->addAttribute('rowspan',"$rowspan"); |
|
200 | + if(($colspan=$this->getColumnSpan()) > 0) |
|
201 | + $writer->addAttribute('colspan', "$colspan"); |
|
202 | + if(($rowspan=$this->getRowSpan()) > 0) |
|
203 | + $writer->addAttribute('rowspan', "$rowspan"); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -101,7 +101,7 @@ |
||
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Sets the horizontal alignment of the contents within the panel. |
104 | - * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
|
104 | + * Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center' |
|
105 | 105 | * @param string the horizontal alignment |
106 | 106 | */ |
107 | 107 | public function setHorizontalAlign($value) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | parent::addAttributesToRender($writer); |
73 | 73 | if(($butt=$this->getDefaultButton())!=='') |
74 | - $writer->addAttribute('id',$this->getClientID()); |
|
74 | + $writer->addAttribute('id', $this->getClientID()); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function getGroupingText() |
170 | 170 | { |
171 | - return $this->getViewState('GroupingText',''); |
|
171 | + return $this->getViewState('GroupingText', ''); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function setGroupingText($value) |
178 | 178 | { |
179 | - $this->setViewState('GroupingText',$value,''); |
|
179 | + $this->setViewState('GroupingText', $value, ''); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | if(($butt=$this->getDefaultButton())!=='') |
231 | 231 | { |
232 | 232 | if(($button=$this->findControl($butt))===null) |
233 | - throw new TInvalidDataValueException('panel_defaultbutton_invalid',$butt); |
|
233 | + throw new TInvalidDataValueException('panel_defaultbutton_invalid', $butt); |
|
234 | 234 | else |
235 | 235 | $this->getPage()->getClientScript()->registerDefaultButton($this, $button); |
236 | 236 | } |
@@ -60,8 +60,8 @@ |
||
60 | 60 | * @param THtmlWriter the writer used for the rendering purpose |
61 | 61 | */ |
62 | 62 | protected function addAttributesToRender($writer) { |
63 | - $writer->addAttribute('id',$this->getClientID()); |
|
64 | - parent::addAttributesToRender($writer); |
|
63 | + $writer->addAttribute('id',$this->getClientID()); |
|
64 | + parent::addAttributesToRender($writer); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function setText($value) |
57 | 57 | { |
58 | - if(parent::getText() === $value) |
|
58 | + if(parent::getText()===$value) |
|
59 | 59 | return; |
60 | 60 | |
61 | 61 | parent::setText($value); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function setForControl($value) |
73 | 73 | { |
74 | - if(parent::getForControl() === $value) |
|
74 | + if(parent::getForControl()===$value) |
|
75 | 75 | return; |
76 | 76 | |
77 | 77 | parent::setForControl($value); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * @param THtmlWriter the writer used for the rendering purpose |
88 | 88 | */ |
89 | 89 | protected function addAttributesToRender($writer) { |
90 | - $writer->addAttribute('id',$this->getClientID()); |
|
90 | + $writer->addAttribute('id', $this->getClientID()); |
|
91 | 91 | parent::addAttributesToRender($writer); |
92 | 92 | } |
93 | 93 | } |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function __construct() |
33 | 33 | { |
34 | - parent::__construct(); |
|
35 | - $this->setAdapter(new TActiveControlAdapter($this)); |
|
34 | + parent::__construct(); |
|
35 | + $this->setAdapter(new TActiveControlAdapter($this)); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function getActiveControl() |
42 | 42 | { |
43 | - return $this->getAdapter()->getBaseActiveControl(); |
|
43 | + return $this->getAdapter()->getBaseActiveControl(); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function setDataSource($value) |
54 | 54 | { |
55 | - parent::setDataSource($value); |
|
56 | - if($this->getActiveControl()->canUpdateClientSide()) { |
|
57 | - $this->renderPager(); |
|
58 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
59 | - } |
|
55 | + parent::setDataSource($value); |
|
56 | + if($this->getActiveControl()->canUpdateClientSide()) { |
|
57 | + $this->renderPager(); |
|
58 | + $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
59 | + } |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function getContainerID() |
67 | 67 | { |
68 | - return $this->ClientID.'_Container'; |
|
68 | + return $this->ClientID.'_Container'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -76,13 +76,13 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function render($writer) |
78 | 78 | { |
79 | - if($this->getHasPreRendered()) { |
|
80 | - $this->renderDataList($writer); |
|
81 | - if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
82 | - } |
|
83 | - else { |
|
84 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
85 | - } |
|
79 | + if($this->getHasPreRendered()) { |
|
80 | + $this->renderDataList($writer); |
|
81 | + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
82 | + } |
|
83 | + else { |
|
84 | + $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
85 | + } |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | */ |
93 | 93 | private function renderPager() |
94 | 94 | { |
95 | - $pager=$this->getPage()->findControlsByType('TActivePager', false); |
|
96 | - foreach($pager as $item) |
|
97 | - { |
|
98 | - if($item->ControlToPaginate==$this->ID) { |
|
99 | - $writer=$this->getResponse()->createHtmlWriter(); |
|
100 | - $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
101 | - } |
|
102 | - } |
|
95 | + $pager=$this->getPage()->findControlsByType('TActivePager', false); |
|
96 | + foreach($pager as $item) |
|
97 | + { |
|
98 | + if($item->ControlToPaginate==$this->ID) { |
|
99 | + $writer=$this->getResponse()->createHtmlWriter(); |
|
100 | + $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
101 | + } |
|
102 | + } |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function renderDataList($writer) |
111 | 111 | { |
112 | - $writer->write('<span id="'.$this->getContainerID().'">'); |
|
113 | - parent::render($writer); |
|
114 | - $writer->write('</span>'); |
|
112 | + $writer->write('<span id="'.$this->getContainerID().'">'); |
|
113 | + parent::render($writer); |
|
114 | + $writer->write('</span>'); |
|
115 | 115 | } |
116 | 116 | } |
@@ -79,8 +79,7 @@ |
||
79 | 79 | if($this->getHasPreRendered()) { |
80 | 80 | $this->renderDataList($writer); |
81 | 81 | if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
82 | - } |
|
83 | - else { |
|
82 | + } else { |
|
84 | 83 | $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
85 | 84 | } |
86 | 85 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | parent::setDataSource($value); |
56 | 56 | if($this->getActiveControl()->canUpdateClientSide()) { |
57 | 57 | $this->renderPager(); |
58 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
58 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | { |
79 | 79 | if($this->getHasPreRendered()) { |
80 | 80 | $this->renderDataList($writer); |
81 | - if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
81 | + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer); |
|
82 | 82 | } |
83 | 83 | else { |
84 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
84 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | if($item->ControlToPaginate==$this->ID) { |
99 | 99 | $writer=$this->getResponse()->createHtmlWriter(); |
100 | - $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
100 | + $this->getPage()->getAdapter()->registerControlToRender($item, $writer); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |