@@ -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 | /** |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TBehavior class file. |
|
4 | - * |
|
5 | - * @author Qiang Xue <[email protected]> |
|
6 | - * @link http://www.yiiframework.com/ |
|
7 | - * @copyright Copyright © 2008-2009 Yii Software LLC |
|
8 | - * @license http://www.yiiframework.com/license/ |
|
9 | - */ |
|
3 | + * TBehavior class file. |
|
4 | + * |
|
5 | + * @author Qiang Xue <[email protected]> |
|
6 | + * @link http://www.yiiframework.com/ |
|
7 | + * @copyright Copyright © 2008-2009 Yii Software LLC |
|
8 | + * @license http://www.yiiframework.com/license/ |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * TBehavior is a convenient base class for behavior classes. |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $this->_owner=$owner; |
45 | 45 | foreach($this->events() as $event=>$handler) |
46 | - $owner->attachEventHandler($event,array($this,$handler)); |
|
46 | + $owner->attachEventHandler($event, array($this, $handler)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function detach($owner) |
57 | 57 | { |
58 | 58 | foreach($this->events() as $event=>$handler) |
59 | - $owner->detachEventHandler($event,array($this,$handler)); |
|
59 | + $owner->detachEventHandler($event, array($this, $handler)); |
|
60 | 60 | $this->_owner=null; |
61 | 61 | } |
62 | 62 |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TJuiDatePicker class file. |
|
4 | - * |
|
5 | - * @author LANDWEHR Computer und Software GmbH <[email protected]> |
|
6 | - * @link http://www.landwehr-software.de/ |
|
7 | - * @copyright Copyright © 2015 LANDWEHR Computer und Software GmbH |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.ActiveControls |
|
10 | - */ |
|
3 | + * TJuiDatePicker class file. |
|
4 | + * |
|
5 | + * @author LANDWEHR Computer und Software GmbH <[email protected]> |
|
6 | + * @link http://www.landwehr-software.de/ |
|
7 | + * @copyright Copyright © 2015 LANDWEHR Computer und Software GmbH |
|
8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | + * @package System.Web.UI.ActiveControls |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Load active text box. |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | { |
91 | 91 | return array('altField', 'altFormat', 'appendText', 'autoSize', 'buttonImage', 'buttonImageOnly', 'buttonText', 'calculateWeek', |
92 | 92 | 'changeMonth', 'changeYear', 'closeText', 'constrainInput', 'currentText', 'dateFormat', 'dayNames', 'dayNamesMin', |
93 | - 'dayNamesShort', 'defaultDate', 'duration', 'firstDay', 'gotoCurrent', 'hideIfNoPrevNext', 'isRTL', 'maxDate', |
|
93 | + 'dayNamesShort', 'defaultDate', 'duration', 'firstDay', 'gotoCurrent', 'hideIfNoPrevNext', 'isRTL', 'maxDate', |
|
94 | 94 | 'minDate', 'monthNames', 'monthNamesShort', 'navigationAsDateFormat', 'nextText', 'numberOfMonths', 'prevText', |
95 | 95 | 'selectOtherMonths', 'shortYearCutoff', 'showAnim', 'showButtonPanel', 'showCurrentAtPos', 'showMonthAfterYear', |
96 | - 'showOn', 'showOptions', 'showOtherMonths', 'showWeek', 'stepMonths', 'weekHeader', 'yearRange', 'yearSuffix', |
|
96 | + 'showOn', 'showOptions', 'showOtherMonths', 'showWeek', 'stepMonths', 'weekHeader', 'yearRange', 'yearSuffix', |
|
97 | 97 | 'beforeShow', 'beforeShowDay', 'onChangeMonthYear', 'onClose', 'onSelect'); |
98 | 98 | } |
99 | 99 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * it will register an additional clientscript to set the language specific global default settings. |
40 | 40 | * @var boolean true, if this is the first instance of TJuiDatePicker, false otherwise |
41 | 41 | */ |
42 | - private static $_first = true; |
|
42 | + private static $_first=true; |
|
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Creates a new callback control, sets the adapter to |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getOptions() |
76 | 76 | { |
77 | - if (($options=$this->getViewState('JuiOptions'))===null) |
|
77 | + if(($options=$this->getViewState('JuiOptions'))===null) |
|
78 | 78 | { |
79 | 79 | $options=new TJuiControlOptions($this); |
80 | 80 | $this->setViewState('JuiOptions', $options); |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | */ |
169 | 169 | protected function getCurrentCulture() |
170 | 170 | { |
171 | - $app = $this->getApplication()->getGlobalization(false); |
|
172 | - return $this->getCulture() == '' ? |
|
171 | + $app=$this->getApplication()->getGlobalization(false); |
|
172 | + return $this->getCulture()=='' ? |
|
173 | 173 | ($app ? $app->getCulture() : 'en') : $this->getCulture(); |
174 | 174 | } |
175 | 175 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function getDateFormat() |
180 | 180 | { |
181 | - return $this->getViewState('DateFormat','dd-MM-yyyy'); |
|
181 | + return $this->getViewState('DateFormat', 'dd-MM-yyyy'); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function setDateFormat($value) |
189 | 189 | { |
190 | - $this->setViewState('DateFormat',$value,'dd-MM-yyyy'); |
|
190 | + $this->setViewState('DateFormat', $value, 'dd-MM-yyyy'); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
@@ -253,8 +253,8 @@ discard block |
||
253 | 253 | $this->setText(''); |
254 | 254 | else |
255 | 255 | { |
256 | - $date = TPropertyValue::ensureFloat($value); |
|
257 | - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$this->getDateFormat()); |
|
256 | + $date=TPropertyValue::ensureFloat($value); |
|
257 | + $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $this->getDateFormat()); |
|
258 | 258 | $this->setText($formatter->format($date)); |
259 | 259 | } |
260 | 260 | } |
@@ -265,9 +265,9 @@ discard block |
||
265 | 265 | */ |
266 | 266 | protected function getTimeStampFromText() |
267 | 267 | { |
268 | - $pattern = $this->getDateFormat(); |
|
269 | - $pattern = str_replace(array('MMMM', 'MMM'), array('MM','MM'), $pattern); |
|
270 | - $formatter = Prado::createComponent('System.Util.TSimpleDateFormatter',$pattern); |
|
268 | + $pattern=$this->getDateFormat(); |
|
269 | + $pattern=str_replace(array('MMMM', 'MMM'), array('MM', 'MM'), $pattern); |
|
270 | + $formatter=Prado::createComponent('System.Util.TSimpleDateFormatter', $pattern); |
|
271 | 271 | return $formatter->parse($this->getText()); |
272 | 272 | } |
273 | 273 | |
@@ -278,10 +278,10 @@ discard block |
||
278 | 278 | */ |
279 | 279 | public function getValidationPropertyValue() |
280 | 280 | { |
281 | - if(($text = $this->getText()) === '') |
|
281 | + if(($text=$this->getText())==='') |
|
282 | 282 | return ''; |
283 | - $date = $this->getTimeStamp(); |
|
284 | - return $date == null ? $text : $date; |
|
283 | + $date=$this->getTimeStamp(); |
|
284 | + return $date==null ? $text : $date; |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | } |
288 | 288 | \ No newline at end of file |
@@ -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 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | /** |
202 | - * @return boolean true to post the inputs of the form on callback, default |
|
202 | + * @return string true to post the inputs of the form on callback, default |
|
203 | 203 | * is post the inputs on callback. |
204 | 204 | */ |
205 | 205 | public function getPostState() |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
220 | - * @return integer callback request timeout. |
|
220 | + * @return string callback request timeout. |
|
221 | 221 | */ |
222 | 222 | public function getRequestTimeOut() |
223 | 223 | { |
@@ -261,6 +261,7 @@ discard block |
||
261 | 261 | * update. This will automatically set HasPrority to true. |
262 | 262 | * @param boolean true enables the callback response to update the |
263 | 263 | * viewstate. |
264 | + * @param boolean $value |
|
264 | 265 | */ |
265 | 266 | public function setEnablePageStateUpdate($value) |
266 | 267 | { |
@@ -269,7 +270,7 @@ discard block |
||
269 | 270 | } |
270 | 271 | |
271 | 272 | /** |
272 | - * @return boolean client-side viewstate will be updated on callback |
|
273 | + * @return boolean|string client-side viewstate will be updated on callback |
|
273 | 274 | * response if true. Default is true. |
274 | 275 | */ |
275 | 276 | public function getEnablePageStateUpdate() |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function setEnablePageStateUpdate($value) |
266 | 266 | { |
267 | - $enabled = TPropertyValue::ensureBoolean($value); |
|
267 | + $enabled=TPropertyValue::ensureBoolean($value); |
|
268 | 268 | $this->setOption('EnablePageStateUpdate', $enabled); |
269 | 269 | } |
270 | 270 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | */ |
275 | 275 | public function getEnablePageStateUpdate() |
276 | 276 | { |
277 | - $option = $this->getOption('EnablePageStateUpdate'); |
|
277 | + $option=$this->getOption('EnablePageStateUpdate'); |
|
278 | 278 | return ($option===null) ? true : $option; |
279 | 279 | } |
280 | 280 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | public function setPostBackTarget($value) |
293 | 293 | { |
294 | 294 | if($value instanceof TControl) |
295 | - $value = $value->getUniqueID(); |
|
295 | + $value=$value->getUniqueID(); |
|
296 | 296 | $this->setOption('EventTarget', $value); |
297 | 297 | } |
298 | 298 |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TActiveMultiView class file |
|
4 | - * |
|
5 | - * @author LANDWEHR Computer und Software GmbH <[email protected]> |
|
6 | - * @link http://www.landwehr-software.de/ |
|
7 | - * @copyright Copyright © 2009 LANDWEHR Computer und Software GmbH |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.ActiveControls |
|
10 | - */ |
|
3 | + * TActiveMultiView class file |
|
4 | + * |
|
5 | + * @author LANDWEHR Computer und Software GmbH <[email protected]> |
|
6 | + * @link http://www.landwehr-software.de/ |
|
7 | + * @copyright Copyright © 2009 LANDWEHR Computer und Software GmbH |
|
8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | + * @package System.Web.UI.ActiveControls |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Includes the following used classes |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | class TActiveMultiView extends TMultiView implements IActiveControl |
31 | 31 | { |
32 | 32 | /** |
33 | - * Creates a new callback control, sets the adapter to |
|
34 | - * TActiveControlAdapter. |
|
35 | - */ |
|
33 | + * Creates a new callback control, sets the adapter to |
|
34 | + * TActiveControlAdapter. |
|
35 | + */ |
|
36 | 36 | public function __construct() |
37 | 37 | { |
38 | 38 | parent::__construct(); |
@@ -40,28 +40,28 @@ discard block |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return TBaseActiveControl standard active control options. |
|
44 | - */ |
|
43 | + * @return TBaseActiveControl standard active control options. |
|
44 | + */ |
|
45 | 45 | public function getActiveControl() |
46 | 46 | { |
47 | 47 | return $this->getAdapter()->getBaseActiveControl(); |
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
51 | - * Returns the id of the surrounding container (span). |
|
52 | - * @return string container id |
|
53 | - */ |
|
51 | + * Returns the id of the surrounding container (span). |
|
52 | + * @return string container id |
|
53 | + */ |
|
54 | 54 | protected function getContainerID() |
55 | 55 | { |
56 | 56 | return $this->ClientID.'_Container'; |
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * Renders the TActiveMultiView. |
|
61 | - * If the MutliView did not pass the prerender phase yet, it will register itself for rendering later. |
|
62 | - * Else it will call the {@link renderMultiView()} method which will do the rendering of the MultiView. |
|
63 | - * @param THtmlWriter writer for the rendering purpose |
|
64 | - */ |
|
60 | + * Renders the TActiveMultiView. |
|
61 | + * If the MutliView did not pass the prerender phase yet, it will register itself for rendering later. |
|
62 | + * Else it will call the {@link renderMultiView()} method which will do the rendering of the MultiView. |
|
63 | + * @param THtmlWriter writer for the rendering purpose |
|
64 | + */ |
|
65 | 65 | public function render($writer) |
66 | 66 | { |
67 | 67 | if($this->getHasPreRendered()) { |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * Renders the TActiveMultiView by writing a span tag with the container id obtained from {@link getContainerID()} |
|
78 | - * which will be called by the replacement method of the client script to update it's content. |
|
79 | - * @param $writer THtmlWriter writer for the rendering purpose |
|
80 | - */ |
|
77 | + * Renders the TActiveMultiView by writing a span tag with the container id obtained from {@link getContainerID()} |
|
78 | + * which will be called by the replacement method of the client script to update it's content. |
|
79 | + * @param $writer THtmlWriter writer for the rendering purpose |
|
80 | + */ |
|
81 | 81 | protected function renderMultiView($writer) |
82 | 82 | { |
83 | 83 | $writer->addAttribute('id', $this->getContainerID()); |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * @param integer the zero-based index of the current view in the view collection. -1 if no active view. |
|
91 | - * @throws TInvalidDataValueException if the view index is invalid |
|
92 | - */ |
|
90 | + * @param integer the zero-based index of the current view in the view collection. -1 if no active view. |
|
91 | + * @throws TInvalidDataValueException if the view index is invalid |
|
92 | + */ |
|
93 | 93 | public function setActiveViewIndex($value) |
94 | 94 | { |
95 | 95 | $old=parent::getActiveViewIndex(); |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
102 | - * @param TView the view to be activated |
|
103 | - * @throws TInvalidOperationException if the view is not in the view collection |
|
104 | - */ |
|
102 | + * @param TView the view to be activated |
|
103 | + * @throws TInvalidOperationException if the view is not in the view collection |
|
104 | + */ |
|
105 | 105 | public function setActiveView($value) |
106 | 106 | { |
107 | 107 | $old=parent::getActiveView(); |
@@ -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 | } |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | if($this->getHasPreRendered()) { |
68 | 68 | $this->renderMultiView($writer); |
69 | 69 | if($this->getActiveControl()->canUpdateClientSide()) |
70 | - $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer); |
|
70 | + $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer); |
|
71 | 71 | } |
72 | 72 | else |
73 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
73 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -92,12 +92,12 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function setActiveViewIndex($value) |
94 | 94 | { |
95 | - if(parent::getActiveViewIndex() === $value) |
|
95 | + if(parent::getActiveViewIndex()===$value) |
|
96 | 96 | return; |
97 | 97 | |
98 | 98 | parent::setActiveViewIndex($value); |
99 | 99 | if($this->getActiveControl()->canUpdateClientSide()) |
100 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
100 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -106,11 +106,11 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function setActiveView($value) |
108 | 108 | { |
109 | - if(parent::getActiveView() === $value) |
|
109 | + if(parent::getActiveView()===$value) |
|
110 | 110 | return; |
111 | 111 | |
112 | 112 | parent::setActiveView($value); |
113 | 113 | if($this->getActiveControl()->canUpdateClientSide()) |
114 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
114 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
115 | 115 | } |
116 | 116 | } |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * Creates a new callback control, sets the adapter to |
|
72 | - * TActiveControlAdapter. |
|
73 | - */ |
|
71 | + * Creates a new callback control, sets the adapter to |
|
72 | + * TActiveControlAdapter. |
|
73 | + */ |
|
74 | 74 | public function __construct() { |
75 | 75 | parent::__construct(); |
76 | 76 | $this->setAdapter(new TActiveControlAdapter($this)); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * @param string $value container tag |
112 | 112 | */ |
113 | 113 | public function setSurroundingTag($value) { |
114 | - $this->_surroundingTag=TPropertyValue::ensureString($value); |
|
114 | + $this->_surroundingTag=TPropertyValue::ensureString($value); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -145,8 +145,7 @@ discard block |
||
145 | 145 | $button->setText($text); |
146 | 146 | return $button; |
147 | 147 | } |
148 | - } |
|
149 | - else { |
|
148 | + } else { |
|
150 | 149 | $button=new TActiveButton; |
151 | 150 | if(!$enabled) |
152 | 151 | $button->setEnabled(false); |
@@ -180,8 +179,7 @@ discard block |
||
180 | 179 | if($this->getHasPreRendered()) { |
181 | 180 | $this->renderDataGrid($writer); |
182 | 181 | if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer); |
183 | - } |
|
184 | - else { |
|
182 | + } else { |
|
185 | 183 | $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
186 | 184 | } |
187 | 185 | } |
@@ -248,8 +246,7 @@ discard block |
||
248 | 246 | $control->setData($text); |
249 | 247 | } |
250 | 248 | $cell->getControls()->add($control); |
251 | - } |
|
252 | - else if($this->getAllowSorting()) { |
|
249 | + } else if($this->getAllowSorting()) { |
|
253 | 250 | $sortExpression=$this->getSortExpression(); |
254 | 251 | if(($url=$this->getHeaderImageUrl())!=='') { |
255 | 252 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton'); |
@@ -262,19 +259,16 @@ discard block |
||
262 | 259 | } |
263 | 260 | $button->setCausesValidation(false); |
264 | 261 | $cell->getControls()->add($button); |
265 | - } |
|
266 | - else if($text!=='') { |
|
262 | + } else if($text!=='') { |
|
267 | 263 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
268 | 264 | $button->setText($text); |
269 | 265 | $button->setCommandName(TDataGrid::CMD_SORT); |
270 | 266 | $button->setCommandParameter($sortExpression); |
271 | 267 | $button->setCausesValidation(false); |
272 | 268 | $cell->getControls()->add($button); |
273 | - } |
|
274 | - else |
|
269 | + } else |
|
275 | 270 | $cell->setText(' '); |
276 | - } |
|
277 | - else { |
|
271 | + } else { |
|
278 | 272 | if(($url=$this->getHeaderImageUrl())!=='') { |
279 | 273 | $image=Prado::createComponent('System.Web.UI.WebControls.TActiveImage'); |
280 | 274 | $image->setImageUrl($url); |
@@ -283,8 +277,7 @@ discard block |
||
283 | 277 | $image->setToolTip($text); |
284 | 278 | } |
285 | 279 | $cell->getControls()->add($image); |
286 | - } |
|
287 | - else if($text!=='') |
|
280 | + } else if($text!=='') |
|
288 | 281 | $cell->setText($text); |
289 | 282 | else |
290 | 283 | $cell->setText(' '); |
@@ -376,8 +369,7 @@ discard block |
||
376 | 369 | $button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
377 | 370 | $cell->getControls()->add($button); |
378 | 371 | $cell->registerObject('Button',$button); |
379 | - } |
|
380 | - else |
|
372 | + } else |
|
381 | 373 | parent::initializeCell($cell,$columnIndex,$itemType); |
382 | 374 | } |
383 | 375 | } |
@@ -416,8 +408,7 @@ discard block |
||
416 | 408 | $control->setData($text); |
417 | 409 | } |
418 | 410 | $cell->getControls()->add($control); |
419 | - } |
|
420 | - else if($this->getAllowSorting()) { |
|
411 | + } else if($this->getAllowSorting()) { |
|
421 | 412 | $sortExpression=$this->getSortExpression(); |
422 | 413 | if(($url=$this->getHeaderImageUrl())!=='') { |
423 | 414 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton'); |
@@ -428,27 +419,23 @@ discard block |
||
428 | 419 | $button->setAlternateText($text); |
429 | 420 | $button->setCausesValidation(false); |
430 | 421 | $cell->getControls()->add($button); |
431 | - } |
|
432 | - else if($text!=='') { |
|
422 | + } else if($text!=='') { |
|
433 | 423 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
434 | 424 | $button->setText($text); |
435 | 425 | $button->setCommandName(TDataGrid::CMD_SORT); |
436 | 426 | $button->setCommandParameter($sortExpression); |
437 | 427 | $button->setCausesValidation(false); |
438 | 428 | $cell->getControls()->add($button); |
439 | - } |
|
440 | - else |
|
429 | + } else |
|
441 | 430 | $cell->setText(' '); |
442 | - } |
|
443 | - else { |
|
431 | + } else { |
|
444 | 432 | if(($url=$this->getHeaderImageUrl())!=='') { |
445 | 433 | $image=Prado::createComponent('System.Web.UI.WebControls.TActiveImage'); |
446 | 434 | $image->setImageUrl($url); |
447 | 435 | if($text!=='') |
448 | 436 | $image->setAlternateText($text); |
449 | 437 | $cell->getControls()->add($image); |
450 | - } |
|
451 | - else if($text!=='') |
|
438 | + } else if($text!=='') |
|
452 | 439 | $cell->setText($text); |
453 | 440 | else |
454 | 441 | $cell->setText(' '); |
@@ -491,8 +478,7 @@ discard block |
||
491 | 478 | $control->setData($text); |
492 | 479 | } |
493 | 480 | $cell->getControls()->add($control); |
494 | - } |
|
495 | - else if($this->getAllowSorting()) |
|
481 | + } else if($this->getAllowSorting()) |
|
496 | 482 | { |
497 | 483 | $sortExpression=$this->getSortExpression(); |
498 | 484 | if(($url=$this->getHeaderImageUrl())!=='') |
@@ -505,8 +491,7 @@ discard block |
||
505 | 491 | $button->setAlternateText($text); |
506 | 492 | $button->setCausesValidation(false); |
507 | 493 | $cell->getControls()->add($button); |
508 | - } |
|
509 | - else if($text!=='') |
|
494 | + } else if($text!=='') |
|
510 | 495 | { |
511 | 496 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
512 | 497 | $button->setText($text); |
@@ -514,11 +499,9 @@ discard block |
||
514 | 499 | $button->setCommandParameter($sortExpression); |
515 | 500 | $button->setCausesValidation(false); |
516 | 501 | $cell->getControls()->add($button); |
517 | - } |
|
518 | - else |
|
502 | + } else |
|
519 | 503 | $cell->setText(' '); |
520 | - } |
|
521 | - else |
|
504 | + } else |
|
522 | 505 | { |
523 | 506 | if(($url=$this->getHeaderImageUrl())!=='') |
524 | 507 | { |
@@ -527,8 +510,7 @@ discard block |
||
527 | 510 | if($text!=='') |
528 | 511 | $image->setAlternateText($text); |
529 | 512 | $cell->getControls()->add($image); |
530 | - } |
|
531 | - else if($text!=='') |
|
513 | + } else if($text!=='') |
|
532 | 514 | $cell->setText($text); |
533 | 515 | else |
534 | 516 | $cell->setText(' '); |
@@ -574,8 +556,7 @@ discard block |
||
574 | 556 | $cell->registerObject('CheckBox',$checkBox); |
575 | 557 | if($this->getDataField()!=='') |
576 | 558 | $checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
577 | - } |
|
578 | - else |
|
559 | + } else |
|
579 | 560 | parent::initializeCell($cell,$columnIndex,$itemType); |
580 | 561 | } |
581 | 562 | |
@@ -597,8 +578,7 @@ discard block |
||
597 | 578 | $control->setData($text); |
598 | 579 | } |
599 | 580 | $cell->getControls()->add($control); |
600 | - } |
|
601 | - else if($this->getAllowSorting()) |
|
581 | + } else if($this->getAllowSorting()) |
|
602 | 582 | { |
603 | 583 | $sortExpression=$this->getSortExpression(); |
604 | 584 | if(($url=$this->getHeaderImageUrl())!=='') |
@@ -611,8 +591,7 @@ discard block |
||
611 | 591 | $button->setAlternateText($text); |
612 | 592 | $button->setCausesValidation(false); |
613 | 593 | $cell->getControls()->add($button); |
614 | - } |
|
615 | - else if($text!=='') |
|
594 | + } else if($text!=='') |
|
616 | 595 | { |
617 | 596 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
618 | 597 | $button->setText($text); |
@@ -620,11 +599,9 @@ discard block |
||
620 | 599 | $button->setCommandParameter($sortExpression); |
621 | 600 | $button->setCausesValidation(false); |
622 | 601 | $cell->getControls()->add($button); |
623 | - } |
|
624 | - else |
|
602 | + } else |
|
625 | 603 | $cell->setText(' '); |
626 | - } |
|
627 | - else |
|
604 | + } else |
|
628 | 605 | { |
629 | 606 | if(($url=$this->getHeaderImageUrl())!=='') |
630 | 607 | { |
@@ -633,8 +610,7 @@ discard block |
||
633 | 610 | if($text!=='') |
634 | 611 | $image->setAlternateText($text); |
635 | 612 | $cell->getControls()->add($image); |
636 | - } |
|
637 | - else if($text!=='') |
|
613 | + } else if($text!=='') |
|
638 | 614 | $cell->setText($text); |
639 | 615 | else |
640 | 616 | $cell->setText(' '); |
@@ -676,8 +652,7 @@ discard block |
||
676 | 652 | $control->setData($text); |
677 | 653 | } |
678 | 654 | $cell->getControls()->add($control); |
679 | - } |
|
680 | - else if($this->getAllowSorting()) |
|
655 | + } else if($this->getAllowSorting()) |
|
681 | 656 | { |
682 | 657 | $sortExpression=$this->getSortExpression(); |
683 | 658 | if(($url=$this->getHeaderImageUrl())!=='') |
@@ -690,8 +665,7 @@ discard block |
||
690 | 665 | $button->setAlternateText($text); |
691 | 666 | $button->setCausesValidation(false); |
692 | 667 | $cell->getControls()->add($button); |
693 | - } |
|
694 | - else if($text!=='') |
|
668 | + } else if($text!=='') |
|
695 | 669 | { |
696 | 670 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
697 | 671 | $button->setText($text); |
@@ -699,11 +673,9 @@ discard block |
||
699 | 673 | $button->setCommandParameter($sortExpression); |
700 | 674 | $button->setCausesValidation(false); |
701 | 675 | $cell->getControls()->add($button); |
702 | - } |
|
703 | - else |
|
676 | + } else |
|
704 | 677 | $cell->setText(' '); |
705 | - } |
|
706 | - else |
|
678 | + } else |
|
707 | 679 | { |
708 | 680 | if(($url=$this->getHeaderImageUrl())!=='') |
709 | 681 | { |
@@ -712,8 +684,7 @@ discard block |
||
712 | 684 | if($text!=='') |
713 | 685 | $image->setAlternateText($text); |
714 | 686 | $cell->getControls()->add($image); |
715 | - } |
|
716 | - else if($text!=='') |
|
687 | + } else if($text!=='') |
|
717 | 688 | $cell->setText($text); |
718 | 689 | else |
719 | 690 | $cell->setText(' '); |
@@ -759,8 +730,7 @@ discard block |
||
759 | 730 | $control->setData($text); |
760 | 731 | } |
761 | 732 | $cell->getControls()->add($control); |
762 | - } |
|
763 | - else if($this->getAllowSorting()) { |
|
733 | + } else if($this->getAllowSorting()) { |
|
764 | 734 | $sortExpression=$this->getSortExpression(); |
765 | 735 | if(($url=$this->getHeaderImageUrl())!=='') { |
766 | 736 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton'); |
@@ -773,19 +743,16 @@ discard block |
||
773 | 743 | } |
774 | 744 | $button->setCausesValidation(false); |
775 | 745 | $cell->getControls()->add($button); |
776 | - } |
|
777 | - else if($text!=='') { |
|
746 | + } else if($text!=='') { |
|
778 | 747 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
779 | 748 | $button->setText($text); |
780 | 749 | $button->setCommandName(TDataGrid::CMD_SORT); |
781 | 750 | $button->setCommandParameter($sortExpression); |
782 | 751 | $button->setCausesValidation(false); |
783 | 752 | $cell->getControls()->add($button); |
784 | - } |
|
785 | - else |
|
753 | + } else |
|
786 | 754 | $cell->setText(' '); |
787 | - } |
|
788 | - else { |
|
755 | + } else { |
|
789 | 756 | if(($url=$this->getHeaderImageUrl())!=='') { |
790 | 757 | $image=Prado::createComponent('System.Web.UI.WebControls.TActiveImage'); |
791 | 758 | $image->setImageUrl($url); |
@@ -794,8 +761,7 @@ discard block |
||
794 | 761 | $image->setToolTip($text); |
795 | 762 | } |
796 | 763 | $cell->getControls()->add($image); |
797 | - } |
|
798 | - else if($text!=='') |
|
764 | + } else if($text!=='') |
|
799 | 765 | $cell->setText($text); |
800 | 766 | else |
801 | 767 | $cell->setText(' '); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | parent::setDataSource($value); |
95 | 95 | if($this->getActiveControl()->canUpdateClientSide()) { |
96 | 96 | $this->renderPager(); |
97 | - $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter()); |
|
97 | + $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter()); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * @param string CommandParameter corresponding to the OnCommand event of the button |
137 | 137 | * @return mixed the button instance |
138 | 138 | */ |
139 | - protected function createPagerButton($pager,$buttonType,$enabled,$text,$commandName,$commandParameter) { |
|
139 | + protected function createPagerButton($pager, $buttonType, $enabled, $text, $commandName, $commandParameter) { |
|
140 | 140 | if($buttonType===TDataGridPagerButtonType::LinkButton) { |
141 | 141 | if($enabled) |
142 | 142 | $button=new TActiveLinkButton; |
@@ -179,10 +179,10 @@ discard block |
||
179 | 179 | public function render($writer) { |
180 | 180 | if($this->getHasPreRendered()) { |
181 | 181 | $this->renderDataGrid($writer); |
182 | - if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(),$writer); |
|
182 | + if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getSurroundingTagId(), $writer); |
|
183 | 183 | } |
184 | 184 | else { |
185 | - $this->getPage()->getAdapter()->registerControlToRender($this,$writer); |
|
185 | + $this->getPage()->getAdapter()->registerControlToRender($this, $writer); |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | foreach($pager as $item) { |
197 | 197 | if($item->ControlToPaginate==$this->ID) { |
198 | 198 | $writer=$this->getResponse()->createHtmlWriter(); |
199 | - $this->getPage()->getAdapter()->registerControlToRender($item,$writer); |
|
199 | + $this->getPage()->getAdapter()->registerControlToRender($item, $writer); |
|
200 | 200 | } |
201 | 201 | } |
202 | 202 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | * @param THtmlWriter writer for the rendering purpose |
209 | 209 | */ |
210 | 210 | private function renderDataGrid($writer) { |
211 | - $writer->addAttribute('id',$this->getSurroundingTagID()); |
|
211 | + $writer->addAttribute('id', $this->getSurroundingTagID()); |
|
212 | 212 | $writer->renderBeginTag($this->getSurroundingTag()); |
213 | 213 | parent::render($writer); |
214 | 214 | $writer->renderEndTag(); |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * @since 3.1.9 |
235 | 235 | */ |
236 | 236 | class TActiveBoundColumn extends TBoundColumn { |
237 | - protected function initializeHeaderCell($cell,$columnIndex) { |
|
237 | + protected function initializeHeaderCell($cell, $columnIndex) { |
|
238 | 238 | $text=$this->getHeaderText(); |
239 | 239 | |
240 | 240 | if(($classPath=$this->getHeaderRenderer())!=='') { |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | * @since 3.1.9 |
314 | 314 | */ |
315 | 315 | class TActiveEditCommandColumn extends TEditCommandColumn { |
316 | - protected function createButton($commandName,$text,$causesValidation,$validationGroup) { |
|
316 | + protected function createButton($commandName, $text, $causesValidation, $validationGroup) { |
|
317 | 317 | if($this->getButtonType()===TButtonColumnType::LinkButton) |
318 | 318 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveLinkButton'); |
319 | 319 | else if($this->getButtonType()===TButtonColumnType::PushButton) |
@@ -322,9 +322,9 @@ discard block |
||
322 | 322 | { |
323 | 323 | $button=Prado::createComponent('System.Web.UI.WebControls.TActiveImageButton'); |
324 | 324 | $button->setToolTip($text); |
325 | - if(strcasecmp($commandName,'Update')===0) |
|
325 | + if(strcasecmp($commandName, 'Update')===0) |
|
326 | 326 | $url=$this->getUpdateImageUrl(); |
327 | - else if(strcasecmp($commandName,'Cancel')===0) |
|
327 | + else if(strcasecmp($commandName, 'Cancel')===0) |
|
328 | 328 | $url=$this->getCancelImageUrl(); |
329 | 329 | else |
330 | 330 | $url=$this->getEditImageUrl(); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | * @since 3.1.9 |
356 | 356 | */ |
357 | 357 | class TActiveButtonColumn extends TButtonColumn { |
358 | - public function initializeCell($cell,$columnIndex,$itemType) { |
|
358 | + public function initializeCell($cell, $columnIndex, $itemType) { |
|
359 | 359 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) { |
360 | 360 | $buttonType=$this->getButtonType(); |
361 | 361 | if($buttonType===TButtonColumnType::LinkButton) |
@@ -373,12 +373,12 @@ discard block |
||
373 | 373 | $button->setCausesValidation($this->getCausesValidation()); |
374 | 374 | $button->setValidationGroup($this->getValidationGroup()); |
375 | 375 | if($this->getDataTextField()!=='' || ($buttonType===TButtonColumnType::ImageButton && $this->getDataImageUrlField()!=='')) |
376 | - $button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
376 | + $button->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
377 | 377 | $cell->getControls()->add($button); |
378 | - $cell->registerObject('Button',$button); |
|
378 | + $cell->registerObject('Button', $button); |
|
379 | 379 | } |
380 | 380 | else |
381 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
381 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
382 | 382 | } |
383 | 383 | } |
384 | 384 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * @since 3.1.9 |
403 | 403 | */ |
404 | 404 | class TActiveTemplateColumn extends TTemplateColumn { |
405 | - protected function initializeHeaderCell($cell,$columnIndex) { |
|
405 | + protected function initializeHeaderCell($cell, $columnIndex) { |
|
406 | 406 | $text=$this->getHeaderText(); |
407 | 407 | |
408 | 408 | if(($classPath=$this->getHeaderRenderer())!=='') { |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | class TActiveHyperLinkColumn extends THyperLinkColumn |
474 | 474 | { |
475 | 475 | |
476 | - protected function initializeHeaderCell($cell,$columnIndex) |
|
476 | + protected function initializeHeaderCell($cell, $columnIndex) |
|
477 | 477 | { |
478 | 478 | $text=$this->getHeaderText(); |
479 | 479 | |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | * @param integer the index to the Columns property that the cell resides in. |
563 | 563 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
564 | 564 | */ |
565 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
565 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
566 | 566 | { |
567 | 567 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) |
568 | 568 | { |
@@ -571,15 +571,15 @@ discard block |
||
571 | 571 | $checkBox->setEnabled(false); |
572 | 572 | $cell->setHorizontalAlign('Center'); |
573 | 573 | $cell->getControls()->add($checkBox); |
574 | - $cell->registerObject('CheckBox',$checkBox); |
|
574 | + $cell->registerObject('CheckBox', $checkBox); |
|
575 | 575 | if($this->getDataField()!=='') |
576 | - $checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
576 | + $checkBox->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
577 | 577 | } |
578 | 578 | else |
579 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
579 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
580 | 580 | } |
581 | 581 | |
582 | - protected function initializeHeaderCell($cell,$columnIndex) |
|
582 | + protected function initializeHeaderCell($cell, $columnIndex) |
|
583 | 583 | { |
584 | 584 | $text=$this->getHeaderText(); |
585 | 585 | |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | */ |
659 | 659 | class TActiveDropDownListColumn extends TDropDownListColumn |
660 | 660 | { |
661 | - protected function initializeHeaderCell($cell,$columnIndex) |
|
661 | + protected function initializeHeaderCell($cell, $columnIndex) |
|
662 | 662 | { |
663 | 663 | $text=$this->getHeaderText(); |
664 | 664 | |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | * @since 3.1.9 |
746 | 746 | */ |
747 | 747 | class TActiveLiteralColumn extends TLiteralColumn { |
748 | - protected function initializeHeaderCell($cell,$columnIndex) { |
|
748 | + protected function initializeHeaderCell($cell, $columnIndex) { |
|
749 | 749 | $text=$this->getHeaderText(); |
750 | 750 | |
751 | 751 | if(($classPath=$this->getHeaderRenderer())!=='') { |
@@ -821,8 +821,8 @@ discard block |
||
821 | 821 | */ |
822 | 822 | public function getClientSide() |
823 | 823 | { |
824 | - if($this->_callbackoptions === null) |
|
825 | - $this->_callbackoptions = new TCallbackOptions; |
|
824 | + if($this->_callbackoptions===null) |
|
825 | + $this->_callbackoptions=new TCallbackOptions; |
|
826 | 826 | return $this->_callbackoptions->getClientSide(); |
827 | 827 | } |
828 | 828 | } |