@@ -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 | } |
@@ -64,10 +64,10 @@ |
||
64 | 64 | */ |
65 | 65 | protected function getTriggerOptions() |
66 | 66 | { |
67 | - $options = parent::getTriggerOptions(); |
|
68 | - $name = preg_replace('/^on/', '', $this->getEventName()); |
|
69 | - $options['EventName'] = strtolower($name); |
|
70 | - $options['StopEvent'] = $this->getPreventDefaultAction(); |
|
67 | + $options=parent::getTriggerOptions(); |
|
68 | + $name=preg_replace('/^on/', '', $this->getEventName()); |
|
69 | + $options['EventName']=strtolower($name); |
|
70 | + $options['StopEvent']=$this->getPreventDefaultAction(); |
|
71 | 71 | return $options; |
72 | 72 | } |
73 | 73 |
@@ -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 | } |
@@ -53,18 +53,18 @@ discard block |
||
53 | 53 | { |
54 | 54 | $uniqueID=$this->getUniqueID(); |
55 | 55 | $this->getPage()->ensureRenderInForm($this); |
56 | - $writer->addAttribute('type','hidden'); |
|
56 | + $writer->addAttribute('type', 'hidden'); |
|
57 | 57 | if($uniqueID!=='') |
58 | - $writer->addAttribute('name',$uniqueID); |
|
58 | + $writer->addAttribute('name', $uniqueID); |
|
59 | 59 | if($this->getID()!=='') |
60 | - $writer->addAttribute('id',$this->getClientID()); |
|
60 | + $writer->addAttribute('id', $this->getClientID()); |
|
61 | 61 | if(($value=$this->getValue())!=='') |
62 | - $writer->addAttribute('value',$value); |
|
62 | + $writer->addAttribute('value', $value); |
|
63 | 63 | |
64 | 64 | if($this->getHasAttributes()) |
65 | 65 | { |
66 | 66 | foreach($this->getAttributes() as $name=>$value) |
67 | - $writer->addAttribute($name,$value); |
|
67 | + $writer->addAttribute($name, $value); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $writer->renderBeginTag('input'); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @param array the input data collection |
79 | 79 | * @return boolean whether the data of the component has been changed |
80 | 80 | */ |
81 | - public function loadPostData($key,$values) |
|
81 | + public function loadPostData($key, $values) |
|
82 | 82 | { |
83 | 83 | $value=$values[$key]; |
84 | 84 | if($value===$this->getValue()) |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function onValueChanged($param) |
148 | 148 | { |
149 | - $this->raiseEvent('OnValueChanged',$this,$param); |
|
149 | + $this->raiseEvent('OnValueChanged', $this, $param); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function getValue() |
156 | 156 | { |
157 | - return $this->getViewState('Value',''); |
|
157 | + return $this->getViewState('Value', ''); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function setValue($value) |
165 | 165 | { |
166 | - $this->setViewState('Value',$value,''); |
|
166 | + $this->setViewState('Value', $value, ''); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getTagName() |
39 | 39 | { |
40 | - return ($this->_tagName !== null) ? $this->_tagName : ($this->_tagName = $this->getDefaultTagName()); |
|
40 | + return ($this->_tagName!==null) ? $this->_tagName : ($this->_tagName=$this->getDefaultTagName()); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -61,6 +61,6 @@ discard block |
||
61 | 61 | * @return boolean true if TagName has deviated from the default. |
62 | 62 | */ |
63 | 63 | public function getIsMutated() { |
64 | - return $this->_tagName !== null && $this->_tagName != $this->getDefaultTagName(); |
|
64 | + return $this->_tagName!==null && $this->_tagName!=$this->getDefaultTagName(); |
|
65 | 65 | } |
66 | 66 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | if(($id=$this->getID())==='') |
41 | 41 | throw new TConfigurationException('contentplaceholder_id_required'); |
42 | - $this->getTemplateControl()->registerContentPlaceHolder($id,$this); |
|
42 | + $this->getTemplateControl()->registerContentPlaceHolder($id, $this); |
|
43 | 43 | $parent->getControls()->add($this); |
44 | 44 | } |
45 | 45 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public function addParsedObject($object) |
44 | 44 | { |
45 | 45 | if(is_string($object)) |
46 | - $object=html_entity_decode($object,ENT_QUOTES,'UTF-8'); |
|
46 | + $object=html_entity_decode($object, ENT_QUOTES, 'UTF-8'); |
|
47 | 47 | parent::addParsedObject($object); |
48 | 48 | } |
49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function getText() |
54 | 54 | { |
55 | - return $this->getViewState('Text',''); |
|
55 | + return $this->getViewState('Text', ''); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function setText($value) |
62 | 62 | { |
63 | - $this->setViewState('Text',$value); |
|
63 | + $this->setViewState('Text', $value); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | { |
74 | 74 | if(($text=$this->getText())==='' && $this->getHasControls()) |
75 | 75 | { |
76 | - $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
|
76 | + $htmlWriter=Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter()); |
|
77 | 77 | parent::renderContents($htmlWriter); |
78 | 78 | $text=$htmlWriter->flush(); |
79 | 79 | } |
@@ -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()) |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function getInitialValue() |
53 | 53 | { |
54 | - return $this->getViewState('InitialValue',$this->getControlPromptValue()); |
|
54 | + return $this->getViewState('InitialValue', $this->getControlPromptValue()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | protected function getControlPromptValue() |
63 | 63 | { |
64 | - $control = $this->getValidationTarget(); |
|
64 | + $control=$this->getValidationTarget(); |
|
65 | 65 | if($control instanceof TListControl) |
66 | 66 | return $control->getPromptValue(); |
67 | 67 | return ''; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function setInitialValue($value) |
75 | 75 | { |
76 | - $this->setViewState('InitialValue',TPropertyValue::ensureString($value),''); |
|
76 | + $this->setViewState('InitialValue', TPropertyValue::ensureString($value), ''); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function evaluateIsValid() |
91 | 91 | { |
92 | - $control = $this->getValidationTarget(); |
|
92 | + $control=$this->getValidationTarget(); |
|
93 | 93 | if($control instanceof TListControl) |
94 | 94 | return $this->validateListControl($control); |
95 | 95 | else if($control instanceof TRadioButton && strlen($control->getGroupName()) > 0) |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | |
101 | 101 | private function validateListControl($control) |
102 | 102 | { |
103 | - $initial = trim($this->getInitialValue()); |
|
104 | - $count = 0; |
|
103 | + $initial=trim($this->getInitialValue()); |
|
104 | + $count=0; |
|
105 | 105 | foreach($control->getItems() as $item) |
106 | 106 | { |
107 | - if($item->getSelected() && $item->getValue() != $initial) |
|
107 | + if($item->getSelected() && $item->getValue()!=$initial) |
|
108 | 108 | $count++; |
109 | 109 | } |
110 | 110 | return $count > 0; |
@@ -112,13 +112,13 @@ discard block |
||
112 | 112 | |
113 | 113 | private function validateRadioButtonGroup($control) |
114 | 114 | { |
115 | - $initial = trim($this->getInitialValue()); |
|
115 | + $initial=trim($this->getInitialValue()); |
|
116 | 116 | foreach($control->getRadioButtonsInGroup() as $radio) |
117 | 117 | { |
118 | 118 | if($radio->getChecked()) |
119 | 119 | { |
120 | - if(strlen($value = $radio->getValue()) > 0) |
|
121 | - return $value !== $initial; |
|
120 | + if(strlen($value=$radio->getValue()) > 0) |
|
121 | + return $value!==$initial; |
|
122 | 122 | else |
123 | 123 | return true; |
124 | 124 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | private function validateStandardControl($control) |
130 | 130 | { |
131 | - $initial = trim($this->getInitialValue()); |
|
131 | + $initial=trim($this->getInitialValue()); |
|
132 | 132 | $value=$this->getValidationValue($control); |
133 | 133 | return (is_bool($value) && $value) || trim($value)!==$initial; |
134 | 134 | } |
@@ -139,13 +139,13 @@ discard block |
||
139 | 139 | */ |
140 | 140 | protected function getClientScriptOptions() |
141 | 141 | { |
142 | - $options = parent::getClientScriptOptions(); |
|
142 | + $options=parent::getClientScriptOptions(); |
|
143 | 143 | $options['InitialValue']=$this->getInitialValue(); |
144 | - $control = $this->getValidationTarget(); |
|
144 | + $control=$this->getValidationTarget(); |
|
145 | 145 | if($control instanceof TListControl) |
146 | - $options['TotalItems'] = $control->getItemCount(); |
|
146 | + $options['TotalItems']=$control->getItemCount(); |
|
147 | 147 | if($control instanceof TRadioButton && strlen($control->getGroupName()) > 0) |
148 | - $options['GroupName'] = $control->getGroupName(); |
|
148 | + $options['GroupName']=$control->getGroupName(); |
|
149 | 149 | return $options; |
150 | 150 | } |
151 | 151 | } |