@@ -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 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function getDataField() |
49 | 49 | { |
50 | - return $this->getViewState('DataField',''); |
|
50 | + return $this->getViewState('DataField', ''); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function setDataField($value) |
57 | 57 | { |
58 | - $this->setViewState('DataField',$value,''); |
|
58 | + $this->setViewState('DataField', $value, ''); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getReadOnly() |
65 | 65 | { |
66 | - return $this->getViewState('ReadOnly',false); |
|
66 | + return $this->getViewState('ReadOnly', false); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function setReadOnly($value) |
73 | 73 | { |
74 | - $this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false); |
|
74 | + $this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @param integer the index to the Columns property that the cell resides in. |
85 | 85 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
86 | 86 | */ |
87 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
87 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
88 | 88 | { |
89 | 89 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) |
90 | 90 | { |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | $checkBox->setEnabled(false); |
94 | 94 | $cell->setHorizontalAlign('Center'); |
95 | 95 | $cell->getControls()->add($checkBox); |
96 | - $cell->registerObject('CheckBox',$checkBox); |
|
96 | + $cell->registerObject('CheckBox', $checkBox); |
|
97 | 97 | if($this->getDataField()!=='') |
98 | - $checkBox->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
98 | + $checkBox->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
99 | 99 | } |
100 | 100 | else |
101 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
101 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | * This method is invoked when datagrid performs databinding. |
107 | 107 | * It populates the content of the cell with the relevant data from data source. |
108 | 108 | */ |
109 | - public function dataBindColumn($sender,$param) |
|
109 | + public function dataBindColumn($sender, $param) |
|
110 | 110 | { |
111 | 111 | $item=$sender->getNamingContainer(); |
112 | 112 | $data=$item->getData(); |
113 | 113 | if(($field=$this->getDataField())!=='') |
114 | - $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data,$field)); |
|
114 | + $value=TPropertyValue::ensureBoolean($this->getDataFieldValue($data, $field)); |
|
115 | 115 | else |
116 | 116 | $value=TPropertyValue::ensureBoolean($data); |
117 | 117 | if($sender instanceof TCheckBox) |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TCheckBoxColumn class file |
|
4 | - * |
|
5 | - * @author Qiang Xue <[email protected]> |
|
6 | - * @link https://github.com/pradosoft/prado |
|
7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.WebControls |
|
10 | - */ |
|
3 | + * TCheckBoxColumn class file |
|
4 | + * |
|
5 | + * @author Qiang Xue <[email protected]> |
|
6 | + * @link https://github.com/pradosoft/prado |
|
7 | + * @copyright Copyright © 2005-2016 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 | * TDataGridColumn class file |
@@ -270,8 +270,7 @@ discard block |
||
270 | 270 | $cell->getControls()->add($listControl); |
271 | 271 | $cell->registerObject('DropDownList',$listControl); |
272 | 272 | $control=$listControl; |
273 | - } |
|
274 | - else |
|
273 | + } else |
|
275 | 274 | $control=$cell; |
276 | 275 | $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
277 | 276 | break; |
@@ -307,8 +306,7 @@ discard block |
||
307 | 306 | $value=$text; |
308 | 307 | $formatString=$this->getDataTextFormatString(); |
309 | 308 | $text=$this->formatDataValue($formatString,$text); |
310 | - } |
|
311 | - else |
|
309 | + } else |
|
312 | 310 | $text=$value; |
313 | 311 | if($sender instanceof TTableCell) |
314 | 312 | $sender->setText($text); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | parent::loadState($state); |
78 | 78 | $this->_stateLoaded=true; |
79 | 79 | if(!$this->_dataBound) |
80 | - $this->_listControl->getItems()->loadState($this->getViewState('Items',null)); |
|
80 | + $this->_listControl->getItems()->loadState($this->getViewState('Items', null)); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function saveState() |
88 | 88 | { |
89 | - $this->setViewState('Items',$this->_listControl->getItems()->saveState(),null); |
|
89 | + $this->setViewState('Items', $this->_listControl->getItems()->saveState(), null); |
|
90 | 90 | return parent::saveState(); |
91 | 91 | } |
92 | 92 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function getDataTextField() |
113 | 113 | { |
114 | - return $this->getViewState('DataTextField',''); |
|
114 | + return $this->getViewState('DataTextField', ''); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function setDataTextField($value) |
124 | 124 | { |
125 | - $this->setViewState('DataTextField',$value,''); |
|
125 | + $this->setViewState('DataTextField', $value, ''); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function getDataTextFormatString() |
132 | 132 | { |
133 | - return $this->getViewState('DataTextFormatString',''); |
|
133 | + return $this->getViewState('DataTextFormatString', ''); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function setDataTextFormatString($value) |
140 | 140 | { |
141 | - $this->setViewState('DataTextFormatString',$value,''); |
|
141 | + $this->setViewState('DataTextFormatString', $value, ''); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function getDataValueField() |
148 | 148 | { |
149 | - return $this->getViewState('DataValueField',''); |
|
149 | + return $this->getViewState('DataValueField', ''); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function setDataValueField($value) |
159 | 159 | { |
160 | - $this->setViewState('DataValueField',$value,''); |
|
160 | + $this->setViewState('DataValueField', $value, ''); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function getReadOnly() |
167 | 167 | { |
168 | - return $this->getViewState('ReadOnly',false); |
|
168 | + return $this->getViewState('ReadOnly', false); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function setReadOnly($value) |
175 | 175 | { |
176 | - $this->setViewState('ReadOnly',TPropertyValue::ensureBoolean($value),false); |
|
176 | + $this->setViewState('ReadOnly', TPropertyValue::ensureBoolean($value), false); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | */ |
198 | 198 | public function getListValueField() |
199 | 199 | { |
200 | - return $this->getViewState('ListValueField',''); |
|
200 | + return $this->getViewState('ListValueField', ''); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public function setListValueField($value) |
207 | 207 | { |
208 | - $this->setViewState('ListValueField',$value,''); |
|
208 | + $this->setViewState('ListValueField', $value, ''); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | public function getListTextField() |
215 | 215 | { |
216 | - return $this->getViewState('ListTextField',''); |
|
216 | + return $this->getViewState('ListTextField', ''); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | public function setListTextField($value) |
223 | 223 | { |
224 | - $this->setViewState('ListTextField',$value,''); |
|
224 | + $this->setViewState('ListTextField', $value, ''); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | public function getListTextFormatString() |
231 | 231 | { |
232 | - return $this->getViewState('ListTextFormatString',''); |
|
232 | + return $this->getViewState('ListTextFormatString', ''); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function setListTextFormatString($value) |
239 | 239 | { |
240 | - $this->setViewState('ListTextFormatString',$value,''); |
|
240 | + $this->setViewState('ListTextFormatString', $value, ''); |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * @param integer the index to the Columns property that the cell resides in. |
252 | 252 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
253 | 253 | */ |
254 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
254 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
255 | 255 | { |
256 | 256 | if(!$this->_dataBound && $this->_listControl->getDataSource()!==null) |
257 | 257 | { |
@@ -268,21 +268,21 @@ discard block |
||
268 | 268 | { |
269 | 269 | $listControl=clone $this->_listControl; |
270 | 270 | $cell->getControls()->add($listControl); |
271 | - $cell->registerObject('DropDownList',$listControl); |
|
271 | + $cell->registerObject('DropDownList', $listControl); |
|
272 | 272 | $control=$listControl; |
273 | 273 | } |
274 | 274 | else |
275 | 275 | $control=$cell; |
276 | - $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
276 | + $control->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
277 | 277 | break; |
278 | 278 | case TListItemType::Item: |
279 | 279 | case TListItemType::AlternatingItem: |
280 | 280 | case TListItemType::SelectedItem: |
281 | 281 | if($this->getDataTextField()!=='' || $this->getDataValueField()!=='') |
282 | - $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
282 | + $cell->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
283 | 283 | break; |
284 | 284 | default: |
285 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
285 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
286 | 286 | break; |
287 | 287 | } |
288 | 288 | } |
@@ -292,21 +292,21 @@ discard block |
||
292 | 292 | * This method is invoked when datagrid performs databinding. |
293 | 293 | * It populates the content of the cell with the relevant data from data source. |
294 | 294 | */ |
295 | - public function dataBindColumn($sender,$param) |
|
295 | + public function dataBindColumn($sender, $param) |
|
296 | 296 | { |
297 | 297 | $item=$sender->getNamingContainer(); |
298 | 298 | $data=$item->getData(); |
299 | 299 | if(($valueField=$this->getDataValueField())!=='') |
300 | - $value=$this->getDataFieldValue($data,$valueField); |
|
300 | + $value=$this->getDataFieldValue($data, $valueField); |
|
301 | 301 | else |
302 | 302 | $value=''; |
303 | 303 | if(($textField=$this->getDataTextField())!=='') |
304 | 304 | { |
305 | - $text=$this->getDataFieldValue($data,$textField); |
|
305 | + $text=$this->getDataFieldValue($data, $textField); |
|
306 | 306 | if($valueField==='') |
307 | 307 | $value=$text; |
308 | 308 | $formatString=$this->getDataTextFormatString(); |
309 | - $text=$this->formatDataValue($formatString,$text); |
|
309 | + $text=$this->formatDataValue($formatString, $text); |
|
310 | 310 | } |
311 | 311 | else |
312 | 312 | $text=$value; |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TDropDownListColumn class file |
|
4 | - * |
|
5 | - * @author Qiang Xue <[email protected]> |
|
6 | - * @link https://github.com/pradosoft/prado |
|
7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.WebControls |
|
10 | - */ |
|
3 | + * TDropDownListColumn class file |
|
4 | + * |
|
5 | + * @author Qiang Xue <[email protected]> |
|
6 | + * @link https://github.com/pradosoft/prado |
|
7 | + * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | + * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | + * @package System.Web.UI.WebControls |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | Prado::using('System.Web.UI.WebControls.TDataGridColumn'); |
13 | 13 | Prado::using('System.Web.UI.WebControls.TDropDownList'); |
@@ -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 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function getRegularExpression() |
64 | 64 | { |
65 | - return $this->getViewState('RegularExpression',''); |
|
65 | + return $this->getViewState('RegularExpression', ''); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function setRegularExpression($value) |
72 | 72 | { |
73 | - $this->setViewState('RegularExpression',$value,''); |
|
73 | + $this->setViewState('RegularExpression', $value, ''); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | { |
85 | 85 | if(($value=$this->getValidationValue($this->getValidationTarget()))==='') |
86 | 86 | return true; |
87 | - if(($expression=addcslashes($this->getRegularExpression(),"/"))!=='') |
|
87 | + if(($expression=addcslashes($this->getRegularExpression(), "/"))!=='') |
|
88 | 88 | { |
89 | - $mods = $this->getPatternModifiers(); |
|
90 | - return preg_match("/^$expression\$/{$mods}",$value); |
|
89 | + $mods=$this->getPatternModifiers(); |
|
90 | + return preg_match("/^$expression\$/{$mods}", $value); |
|
91 | 91 | } |
92 | 92 | else |
93 | 93 | return true; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | protected function getClientScriptOptions() |
135 | 135 | { |
136 | - $options = parent::getClientScriptOptions(); |
|
136 | + $options=parent::getClientScriptOptions(); |
|
137 | 137 | $options['ValidationExpression']=$this->getRegularExpression(); |
138 | 138 | $options['PatternModifiers']=$this->getClientSidePatternModifiers(); |
139 | 139 | return $options; |
@@ -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 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function getDataField() |
40 | 40 | { |
41 | - return $this->getViewState('DataField',''); |
|
41 | + return $this->getViewState('DataField', ''); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function setDataField($value) |
48 | 48 | { |
49 | - $this->setViewState('DataField',$value,''); |
|
49 | + $this->setViewState('DataField', $value, ''); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getDataFormatString() |
56 | 56 | { |
57 | - return $this->getViewState('DataFormatString',''); |
|
57 | + return $this->getViewState('DataFormatString', ''); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function setDataFormatString($value) |
64 | 64 | { |
65 | - $this->setViewState('DataFormatString',$value,''); |
|
65 | + $this->setViewState('DataFormatString', $value, ''); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getText() |
72 | 72 | { |
73 | - return $this->getViewState('Text',''); |
|
73 | + return $this->getViewState('Text', ''); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function setText($value) |
80 | 80 | { |
81 | - $this->setViewState('Text',$value,''); |
|
81 | + $this->setViewState('Text', $value, ''); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function getEncode() |
88 | 88 | { |
89 | - return $this->getViewState('Encode',false); |
|
89 | + return $this->getViewState('Encode', false); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function setEncode($value) |
96 | 96 | { |
97 | - $this->setViewState('Encode',TPropertyValue::ensureBoolean($value),false); |
|
97 | + $this->setViewState('Encode', TPropertyValue::ensureBoolean($value), false); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | * @param integer the index to the Columns property that the cell resides in. |
105 | 105 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
106 | 106 | */ |
107 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
107 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
108 | 108 | { |
109 | 109 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::EditItem || $itemType===TListItemType::SelectedItem) |
110 | 110 | { |
111 | 111 | if($this->getDataField()!=='') |
112 | 112 | { |
113 | - $cell->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
113 | + $cell->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
114 | 114 | } else { |
115 | 115 | $text=$this->getText(); |
116 | 116 | if($this->getEncode()) |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | } |
121 | 121 | else |
122 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
122 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -127,15 +127,15 @@ discard block |
||
127 | 127 | * This method is invoked when datagrid performs databinding. |
128 | 128 | * It populates the content of the cell with the relevant data from data source. |
129 | 129 | */ |
130 | - public function dataBindColumn($sender,$param) |
|
130 | + public function dataBindColumn($sender, $param) |
|
131 | 131 | { |
132 | 132 | $item=$sender->getNamingContainer(); |
133 | 133 | $data=$item->getData(); |
134 | 134 | $formatString=$this->getDataFormatString(); |
135 | 135 | if(($field=$this->getDataField())!=='') |
136 | - $value=$this->formatDataValue($formatString,$this->getDataFieldValue($data,$field)); |
|
136 | + $value=$this->formatDataValue($formatString, $this->getDataFieldValue($data, $field)); |
|
137 | 137 | else |
138 | - $value=$this->formatDataValue($formatString,$data); |
|
138 | + $value=$this->formatDataValue($formatString, $data); |
|
139 | 139 | if($sender instanceof TTableCell) |
140 | 140 | { |
141 | 141 | if($this->getEncode()) |
@@ -73,8 +73,7 @@ discard block |
||
73 | 73 | try |
74 | 74 | { |
75 | 75 | $result=$this->getTemplateControl()->evaluateExpression($this->_condition); |
76 | - } |
|
77 | - catch(Exception $e) |
|
76 | + } catch(Exception $e) |
|
78 | 77 | { |
79 | 78 | throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage()); |
80 | 79 | } |
@@ -82,8 +81,7 @@ discard block |
||
82 | 81 | { |
83 | 82 | if($this->_trueTemplate) |
84 | 83 | $this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this); |
85 | - } |
|
86 | - else if($this->_falseTemplate) |
|
84 | + } else if($this->_falseTemplate) |
|
87 | 85 | $this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this); |
88 | 86 | $this->_creatingChildren=false; |
89 | 87 | } |
@@ -76,15 +76,15 @@ |
||
76 | 76 | } |
77 | 77 | catch(Exception $e) |
78 | 78 | { |
79 | - throw new TInvalidDataValueException('conditional_condition_invalid',$this->_condition,$e->getMessage()); |
|
79 | + throw new TInvalidDataValueException('conditional_condition_invalid', $this->_condition, $e->getMessage()); |
|
80 | 80 | } |
81 | 81 | if($result) |
82 | 82 | { |
83 | 83 | if($this->_trueTemplate) |
84 | - $this->_trueTemplate->instantiateIn($this->getTemplateControl(),$this); |
|
84 | + $this->_trueTemplate->instantiateIn($this->getTemplateControl(), $this); |
|
85 | 85 | } |
86 | 86 | else if($this->_falseTemplate) |
87 | - $this->_falseTemplate->instantiateIn($this->getTemplateControl(),$this); |
|
87 | + $this->_falseTemplate->instantiateIn($this->getTemplateControl(), $this); |
|
88 | 88 | $this->_creatingChildren=false; |
89 | 89 | } |
90 | 90 |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TConditional class file. |
|
4 | - * |
|
5 | - * @author Qiang Xue <[email protected]> |
|
6 | - * @link https://github.com/pradosoft/prado |
|
7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.WebControls |
|
10 | - */ |
|
3 | + * TConditional class file. |
|
4 | + * |
|
5 | + * @author Qiang Xue <[email protected]> |
|
6 | + * @link https://github.com/pradosoft/prado |
|
7 | + * @copyright Copyright © 2005-2016 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 | * TConditional class. |
@@ -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 | } |
@@ -34,11 +34,11 @@ |
||
34 | 34 | * @param TEventParameter event parameter |
35 | 35 | * @return boolean whether the event bubbling should stop here. |
36 | 36 | */ |
37 | - public function bubbleEvent($sender,$param) |
|
37 | + public function bubbleEvent($sender, $param) |
|
38 | 38 | { |
39 | 39 | if($param instanceof TCommandEventParameter) |
40 | 40 | { |
41 | - $this->raiseBubbleEvent($this,new TRepeaterCommandEventParameter($this,$sender,$param)); |
|
41 | + $this->raiseBubbleEvent($this, new TRepeaterCommandEventParameter($this, $sender, $param)); |
|
42 | 42 | return true; |
43 | 43 | } |
44 | 44 | else |
@@ -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 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getText() |
56 | 56 | { |
57 | - return $this->getViewState('Text',''); |
|
57 | + return $this->getViewState('Text', ''); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function setText($value) |
65 | 65 | { |
66 | - $this->setViewState('Text',$value,''); |
|
66 | + $this->setViewState('Text', $value, ''); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getDataTextField() |
73 | 73 | { |
74 | - return $this->getViewState('DataTextField',''); |
|
74 | + return $this->getViewState('DataTextField', ''); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function setDataTextField($value) |
81 | 81 | { |
82 | - $this->setViewState('DataTextField',$value,''); |
|
82 | + $this->setViewState('DataTextField', $value, ''); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function getDataTextFormatString() |
89 | 89 | { |
90 | - return $this->getViewState('DataTextFormatString',''); |
|
90 | + return $this->getViewState('DataTextFormatString', ''); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function setDataTextFormatString($value) |
97 | 97 | { |
98 | - $this->setViewState('DataTextFormatString',$value,''); |
|
98 | + $this->setViewState('DataTextFormatString', $value, ''); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function getImageHeight() |
105 | 105 | { |
106 | - return $this->getViewState('ImageHeight',''); |
|
106 | + return $this->getViewState('ImageHeight', ''); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function setImageHeight($value) |
113 | 113 | { |
114 | - $this->setViewState('ImageHeight',$value,''); |
|
114 | + $this->setViewState('ImageHeight', $value, ''); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function getImageUrl() |
121 | 121 | { |
122 | - return $this->getViewState('ImageUrl',''); |
|
122 | + return $this->getViewState('ImageUrl', ''); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function setImageUrl($value) |
129 | 129 | { |
130 | - $this->setViewState('ImageUrl',$value,''); |
|
130 | + $this->setViewState('ImageUrl', $value, ''); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function getImageWidth() |
137 | 137 | { |
138 | - return $this->getViewState('ImageWidth',''); |
|
138 | + return $this->getViewState('ImageWidth', ''); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function setImageWidth($value) |
145 | 145 | { |
146 | - $this->setViewState('ImageWidth',$value,''); |
|
146 | + $this->setViewState('ImageWidth', $value, ''); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function getNavigateUrl() |
153 | 153 | { |
154 | - return $this->getViewState('NavigateUrl',''); |
|
154 | + return $this->getViewState('NavigateUrl', ''); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function setNavigateUrl($value) |
162 | 162 | { |
163 | - $this->setViewState('NavigateUrl',$value,''); |
|
163 | + $this->setViewState('NavigateUrl', $value, ''); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function getDataNavigateUrlField() |
170 | 170 | { |
171 | - return $this->getViewState('DataNavigateUrlField',''); |
|
171 | + return $this->getViewState('DataNavigateUrlField', ''); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function setDataNavigateUrlField($value) |
178 | 178 | { |
179 | - $this->setViewState('DataNavigateUrlField',$value,''); |
|
179 | + $this->setViewState('DataNavigateUrlField', $value, ''); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function getDataNavigateUrlFormatString() |
186 | 186 | { |
187 | - return $this->getViewState('DataNavigateUrlFormatString',''); |
|
187 | + return $this->getViewState('DataNavigateUrlFormatString', ''); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | /** |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function setDataNavigateUrlFormatString($value) |
194 | 194 | { |
195 | - $this->setViewState('DataNavigateUrlFormatString',$value,''); |
|
195 | + $this->setViewState('DataNavigateUrlFormatString', $value, ''); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | /** |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function getTarget() |
202 | 202 | { |
203 | - return $this->getViewState('Target',''); |
|
203 | + return $this->getViewState('Target', ''); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function setTarget($value) |
211 | 211 | { |
212 | - $this->setViewState('Target',$value,''); |
|
212 | + $this->setViewState('Target', $value, ''); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
@@ -220,12 +220,12 @@ discard block |
||
220 | 220 | * @param integer the index to the Columns property that the cell resides in. |
221 | 221 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
222 | 222 | */ |
223 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
223 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
224 | 224 | { |
225 | 225 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) |
226 | 226 | { |
227 | 227 | $link=new THyperLink; |
228 | - if(($url = $this->getImageUrl())!=='') |
|
228 | + if(($url=$this->getImageUrl())!=='') |
|
229 | 229 | { |
230 | 230 | $link->setImageUrl($url); |
231 | 231 | if(($width=$this->getImageWidth())!=='') |
@@ -237,12 +237,12 @@ discard block |
||
237 | 237 | $link->setNavigateUrl($this->getNavigateUrl()); |
238 | 238 | $link->setTarget($this->getTarget()); |
239 | 239 | if($this->getDataTextField()!=='' || $this->getDataNavigateUrlField()!=='') |
240 | - $link->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
240 | + $link->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
241 | 241 | $cell->getControls()->add($link); |
242 | - $cell->registerObject('HyperLink',$link); |
|
242 | + $cell->registerObject('HyperLink', $link); |
|
243 | 243 | } |
244 | 244 | else |
245 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
245 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
@@ -250,20 +250,20 @@ discard block |
||
250 | 250 | * This method is invoked when datagrid performs databinding. |
251 | 251 | * It populates the content of the cell with the relevant data from data source. |
252 | 252 | */ |
253 | - public function dataBindColumn($sender,$param) |
|
253 | + public function dataBindColumn($sender, $param) |
|
254 | 254 | { |
255 | 255 | $item=$sender->getNamingContainer(); |
256 | 256 | $data=$item->getData(); |
257 | 257 | if(($field=$this->getDataTextField())!=='') |
258 | 258 | { |
259 | - $value=$this->getDataFieldValue($data,$field); |
|
260 | - $text=$this->formatDataValue($this->getDataTextFormatString(),$value); |
|
259 | + $value=$this->getDataFieldValue($data, $field); |
|
260 | + $text=$this->formatDataValue($this->getDataTextFormatString(), $value); |
|
261 | 261 | $sender->setText($text); |
262 | 262 | } |
263 | 263 | if(($field=$this->getDataNavigateUrlField())!=='') |
264 | 264 | { |
265 | - $value=$this->getDataFieldValue($data,$field); |
|
266 | - $url=$this->formatDataValue($this->getDataNavigateUrlFormatString(),$value); |
|
265 | + $value=$this->getDataFieldValue($data, $field); |
|
266 | + $url=$this->formatDataValue($this->getDataNavigateUrlFormatString(), $value); |
|
267 | 267 | $sender->setNavigateUrl($url); |
268 | 268 | } |
269 | 269 | } |
@@ -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 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function getText() |
59 | 59 | { |
60 | - return $this->getViewState('Text',''); |
|
60 | + return $this->getViewState('Text', ''); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function setText($value) |
68 | 68 | { |
69 | - $this->setViewState('Text',$value,''); |
|
69 | + $this->setViewState('Text', $value, ''); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function getDataTextField() |
76 | 76 | { |
77 | - return $this->getViewState('DataTextField',''); |
|
77 | + return $this->getViewState('DataTextField', ''); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function setDataTextField($value) |
84 | 84 | { |
85 | - $this->setViewState('DataTextField',$value,''); |
|
85 | + $this->setViewState('DataTextField', $value, ''); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function getDataTextFormatString() |
92 | 92 | { |
93 | - return $this->getViewState('DataTextFormatString',''); |
|
93 | + return $this->getViewState('DataTextFormatString', ''); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function setDataTextFormatString($value) |
100 | 100 | { |
101 | - $this->setViewState('DataTextFormatString',$value,''); |
|
101 | + $this->setViewState('DataTextFormatString', $value, ''); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getImageUrl() |
108 | 108 | { |
109 | - return $this->getViewState('ImageUrl',''); |
|
109 | + return $this->getViewState('ImageUrl', ''); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function setImageUrl($value) |
116 | 116 | { |
117 | - $this->setViewState('ImageUrl',$value,''); |
|
117 | + $this->setViewState('ImageUrl', $value, ''); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function getDataImageUrlField() |
124 | 124 | { |
125 | - return $this->getViewState('DataImageUrlField',''); |
|
125 | + return $this->getViewState('DataImageUrlField', ''); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function setDataImageUrlField($value) |
132 | 132 | { |
133 | - $this->setViewState('DataImageUrlField',$value,''); |
|
133 | + $this->setViewState('DataImageUrlField', $value, ''); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function getDataImageUrlFormatString() |
140 | 140 | { |
141 | - return $this->getViewState('DataImageUrlFormatString',''); |
|
141 | + return $this->getViewState('DataImageUrlFormatString', ''); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function setDataImageUrlFormatString($value) |
148 | 148 | { |
149 | - $this->setViewState('DataImageUrlFormatString',$value,''); |
|
149 | + $this->setViewState('DataImageUrlFormatString', $value, ''); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function getButtonType() |
156 | 156 | { |
157 | - return $this->getViewState('ButtonType',TButtonColumnType::LinkButton); |
|
157 | + return $this->getViewState('ButtonType', TButtonColumnType::LinkButton); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function setButtonType($value) |
164 | 164 | { |
165 | - $this->setViewState('ButtonType',TPropertyValue::ensureEnum($value,'TButtonColumnType'),TButtonColumnType::LinkButton); |
|
165 | + $this->setViewState('ButtonType', TPropertyValue::ensureEnum($value, 'TButtonColumnType'), TButtonColumnType::LinkButton); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | public function getCommandName() |
172 | 172 | { |
173 | - return $this->getViewState('CommandName',''); |
|
173 | + return $this->getViewState('CommandName', ''); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | /** |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function setCommandName($value) |
181 | 181 | { |
182 | - $this->setViewState('CommandName',$value,''); |
|
182 | + $this->setViewState('CommandName', $value, ''); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function getCausesValidation() |
189 | 189 | { |
190 | - return $this->getViewState('CausesValidation',true); |
|
190 | + return $this->getViewState('CausesValidation', true); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public function setCausesValidation($value) |
197 | 197 | { |
198 | - $this->setViewState('CausesValidation',TPropertyValue::ensureBoolean($value),true); |
|
198 | + $this->setViewState('CausesValidation', TPropertyValue::ensureBoolean($value), true); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | /** |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function getValidationGroup() |
205 | 205 | { |
206 | - return $this->getViewState('ValidationGroup',''); |
|
206 | + return $this->getViewState('ValidationGroup', ''); |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | /** |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | */ |
212 | 212 | public function setValidationGroup($value) |
213 | 213 | { |
214 | - $this->setViewState('ValidationGroup',$value,''); |
|
214 | + $this->setViewState('ValidationGroup', $value, ''); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * @param integer the index to the Columns property that the cell resides in. |
223 | 223 | * @param string the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
224 | 224 | */ |
225 | - public function initializeCell($cell,$columnIndex,$itemType) |
|
225 | + public function initializeCell($cell, $columnIndex, $itemType) |
|
226 | 226 | { |
227 | 227 | if($itemType===TListItemType::Item || $itemType===TListItemType::AlternatingItem || $itemType===TListItemType::SelectedItem || $itemType===TListItemType::EditItem) |
228 | 228 | { |
@@ -242,12 +242,12 @@ discard block |
||
242 | 242 | $button->setCausesValidation($this->getCausesValidation()); |
243 | 243 | $button->setValidationGroup($this->getValidationGroup()); |
244 | 244 | if($this->getDataTextField()!=='' || ($buttonType===TButtonColumnType::ImageButton && $this->getDataImageUrlField()!=='')) |
245 | - $button->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
|
245 | + $button->attachEventHandler('OnDataBinding', array($this, 'dataBindColumn')); |
|
246 | 246 | $cell->getControls()->add($button); |
247 | - $cell->registerObject('Button',$button); |
|
247 | + $cell->registerObject('Button', $button); |
|
248 | 248 | } |
249 | 249 | else |
250 | - parent::initializeCell($cell,$columnIndex,$itemType); |
|
250 | + parent::initializeCell($cell, $columnIndex, $itemType); |
|
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
@@ -255,20 +255,20 @@ discard block |
||
255 | 255 | * This method is invoked when datagrid performs databinding. |
256 | 256 | * It populates the content of the cell with the relevant data from data source. |
257 | 257 | */ |
258 | - public function dataBindColumn($sender,$param) |
|
258 | + public function dataBindColumn($sender, $param) |
|
259 | 259 | { |
260 | 260 | if($sender instanceof IButtonControl) |
261 | 261 | { |
262 | 262 | if(($field=$this->getDataTextField())!=='') |
263 | 263 | { |
264 | - $value=$this->getDataFieldValue($sender->getNamingContainer()->getData(),$field); |
|
265 | - $text=$this->formatDataValue($this->getDataTextFormatString(),$value); |
|
264 | + $value=$this->getDataFieldValue($sender->getNamingContainer()->getData(), $field); |
|
265 | + $text=$this->formatDataValue($this->getDataTextFormatString(), $value); |
|
266 | 266 | $sender->setText($text); |
267 | 267 | } |
268 | 268 | if(($sender instanceof TImageButton) && ($field=$this->getDataImageUrlField())!=='') |
269 | 269 | { |
270 | - $value=$this->getDataFieldValue($sender->getNamingContainer()->getData(),$field); |
|
271 | - $url=$this->formatDataValue($this->getDataImageUrlFormatString(),$value); |
|
270 | + $value=$this->getDataFieldValue($sender->getNamingContainer()->getData(), $field); |
|
271 | + $url=$this->formatDataValue($this->getDataImageUrlFormatString(), $value); |
|
272 | 272 | $sender->setImageUrl($url); |
273 | 273 | } |
274 | 274 | } |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * TButtonColumn class file |
|
4 | - * |
|
5 | - * @author Qiang Xue <[email protected]> |
|
6 | - * @link https://github.com/pradosoft/prado |
|
7 | - * @copyright Copyright © 2005-2016 The PRADO Group |
|
8 | - * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT |
|
9 | - * @package System.Web.UI.WebControls |
|
10 | - */ |
|
3 | + * TButtonColumn class file |
|
4 | + * |
|
5 | + * @author Qiang Xue <[email protected]> |
|
6 | + * @link https://github.com/pradosoft/prado |
|
7 | + * @copyright Copyright © 2005-2016 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 | * TDataGridColumn class file |
@@ -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 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function getText() |
38 | 38 | { |
39 | - return $this->getViewState('Text',''); |
|
39 | + return $this->getViewState('Text', ''); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function setText($value) |
47 | 47 | { |
48 | - $this->setViewState('Text',TPropertyValue::ensureString($value),''); |
|
48 | + $this->setViewState('Text', TPropertyValue::ensureString($value), ''); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function getEncode() |
81 | 81 | { |
82 | - return $this->getViewState('Encode',false); |
|
82 | + return $this->getViewState('Encode', false); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function setEncode($value) |
89 | 89 | { |
90 | - $this->setViewState('Encode',TPropertyValue::ensureBoolean($value),false); |
|
90 | + $this->setViewState('Encode', TPropertyValue::ensureBoolean($value), false); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | /** |