Completed
Push — namespace2 ( f33251...a96835 )
by Fabio
11:40
created
framework/Web/UI/ActiveControls/TAutoComplete.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -201,6 +201,7 @@  discard block
 block discarded – undo
201 201
 	 * method, be sure to call the parent implementation so that the event
202 202
 	 * handler can be invoked.
203 203
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
204
+	 * @param TAutoCompleteEventParameter $param
204 205
 	 */
205 206
 	public function onSuggest($param)
206 207
 	{
@@ -213,6 +214,7 @@  discard block
 block discarded – undo
213 214
 	 * method, be sure to call the parent implementation so that the event
214 215
 	 * handler can be invoked.
215 216
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
217
+	 * @param TAutoCompleteEventParameter $param
216 218
 	 */
217 219
 	public function onSuggestionSelected($param)
218 220
 	{
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public function setFrequency($value)
132 132
 	{
133
-		$this->setViewState('frequency', TPropertyValue::ensureFloat($value),'');
133
+		$this->setViewState('frequency', TPropertyValue::ensureFloat($value), '');
134 134
 	}
135 135
 
136 136
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function getMinChars()
140 140
 	{
141
-		return $this->getViewState('minChars','');
141
+		return $this->getViewState('minChars', '');
142 142
 	}
143 143
 
144 144
 	/**
@@ -177,17 +177,17 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
  	public function raiseCallbackEvent($param)
179 179
 	{
180
-		$token = $param->getCallbackParameter();
181
-		if(is_array($token) && count($token) == 2)
180
+		$token=$param->getCallbackParameter();
181
+		if(is_array($token) && count($token)==2)
182 182
 		{
183
-			if($token[1] === '__TAutoComplete_onSuggest__')
183
+			if($token[1]==='__TAutoComplete_onSuggest__')
184 184
 			{
185
-				$parameter = new TAutoCompleteEventParameter($this->getResponse(), $token[0]);
185
+				$parameter=new TAutoCompleteEventParameter($this->getResponse(), $token[0]);
186 186
 				$this->onSuggest($parameter);
187 187
 			}
188
-			else if($token[1] === '__TAutoComplete_onSuggestionSelected__')
188
+			else if($token[1]==='__TAutoComplete_onSuggestionSelected__')
189 189
 			{
190
-				$parameter = new TAutoCompleteEventParameter($this->getResponse(), null, $token[0]);
190
+				$parameter=new TAutoCompleteEventParameter($this->getResponse(), null, $token[0]);
191 191
 				$this->onSuggestionSelected($parameter);
192 192
 			}
193 193
 		}
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 	public function getResultPanel()
245 245
 	{
246 246
 		if($this->_resultPanel===null)
247
-			$this->_resultPanel = $this->createResultPanel();
247
+			$this->_resultPanel=$this->createResultPanel();
248 248
 		return $this->_resultPanel;
249 249
 	}
250 250
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	 */
254 254
 	protected function createResultPanel()
255 255
 	{
256
-		$panel = new TPanel;
256
+		$panel=new TPanel;
257 257
 		$this->getControls()->add($panel);
258 258
 		$panel->setID('result');
259 259
 		return $panel;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	public function getSuggestions()
266 266
 	{
267 267
 		if($this->_repeater===null)
268
-			$this->_repeater = $this->createRepeater();
268
+			$this->_repeater=$this->createRepeater();
269 269
 		return $this->_repeater;
270 270
 	}
271 271
 
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	protected function createRepeater()
276 276
 	{
277
-		$repeater = new TRepeater;
277
+		$repeater=new TRepeater;
278 278
 		$repeater->setHeaderTemplate(new TAutoCompleteTemplate('<ul>'));
279 279
 		$repeater->setFooterTemplate(new TAutoCompleteTemplate('</ul>'));
280
-		$repeater->setItemTemplate(new TTemplate('<li><%# $this->DataItem %></li>',null));
280
+		$repeater->setItemTemplate(new TTemplate('<li><%# $this->DataItem %></li>', null));
281 281
 		$repeater->setEmptyTemplate(new TAutoCompleteTemplate('<ul></ul>'));
282 282
 		$this->getControls()->add($repeater);
283 283
 		return $repeater;
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 		if($this->getActiveControl()->canUpdateClientSide())
322 322
 		{
323 323
 			$this->getSuggestions()->render($writer);
324
-			$boundary = $writer->getWriter()->getBoundary();
324
+			$boundary=$writer->getWriter()->getBoundary();
325 325
 			$this->getResponse()->getAdapter()->setResponseData($boundary);
326 326
 		}
327 327
 	}
@@ -333,29 +333,29 @@  discard block
 block discarded – undo
333 333
 	{
334 334
 		//disallow page state update ?
335 335
 		//$this->getActiveControl()->getClientSide()->setEnablePageStateUpdate(false);
336
-		$options = array();
337
-		if(strlen($string = $this->getSeparator()))
336
+		$options=array();
337
+		if(strlen($string=$this->getSeparator()))
338 338
 		{
339
-			$string = strtr($string,array('\t'=>"\t",'\n'=>"\n",'\r'=>"\r"));
340
-			$token = preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY);
341
-			$options['tokens'] = $token;
339
+			$string=strtr($string, array('\t'=>"\t", '\n'=>"\n", '\r'=>"\r"));
340
+			$token=preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY);
341
+			$options['tokens']=$token;
342 342
 		}
343 343
 		if($this->getAutoPostBack())
344 344
 		{
345
-			$options = array_merge($options,parent::getPostBackOptions());
346
-			$options['AutoPostBack'] = true;
345
+			$options=array_merge($options, parent::getPostBackOptions());
346
+			$options['AutoPostBack']=true;
347 347
 		}
348
-		if(strlen($select = $this->getTextCssClass()))
349
-			$options['select'] = $select;
350
-		$options['ResultPanel'] = $this->getResultPanel()->getClientID();
351
-		$options['ID'] = $this->getClientID();
352
-		$options['EventTarget'] = $this->getUniqueID();
348
+		if(strlen($select=$this->getTextCssClass()))
349
+			$options['select']=$select;
350
+		$options['ResultPanel']=$this->getResultPanel()->getClientID();
351
+		$options['ID']=$this->getClientID();
352
+		$options['EventTarget']=$this->getUniqueID();
353 353
 		if(($minchars=$this->getMinChars())!=='')
354
-			$options['minChars'] = $minchars;
354
+			$options['minChars']=$minchars;
355 355
 		if(($frequency=$this->getFrequency())!=='')
356
-			$options['frequency'] = $frequency;
357
-		$options['CausesValidation'] = $this->getCausesValidation();
358
-		$options['ValidationGroup'] = $this->getValidationGroup();
356
+			$options['frequency']=$frequency;
357
+		$options['CausesValidation']=$this->getCausesValidation();
358
+		$options['ValidationGroup']=$this->getValidationGroup();
359 359
 		return $options;
360 360
 	}
361 361
 
Please login to merge, or discard this patch.