Code Duplication    Length = 12-13 lines in 2 locations

Ajax/common/traits/JsUtilsAjaxTrait.php 2 locations

@@ 274-285 (lines=12) @@
271
	 * @param string $url the request address
272
	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true)
273
	 */
274
	public function jsonOn($event,$element, $url,$parameters=array()) {
275
		$preventDefault=true;
276
		$stopPropagation=true;
277
		$jsCallback=null;
278
		$attr="id";
279
		$method="get";
280
		$context="document";
281
		$params="{}";
282
		$immediatly=true;
283
		extract($parameters);
284
		return $this->_add_event($element, $this->_json($url,$method, $params,$jsCallback, $attr,$context), $event, $preventDefault, $stopPropagation,$immediatly);
285
	}
286
287
	/**
288
	 * Prepares an ajax request delayed and receives the JSON data types by assigning DOM elements with the same name
@@ 368-380 (lines=13) @@
365
	 * @param string $url the request url
366
	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","rowClass"=>"_json","immediatly"=>true)
367
	 */
368
	public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) {
369
		$preventDefault=true;
370
		$stopPropagation=true;
371
		$jsCallback=null;
372
		$attr="id";
373
		$method="get";
374
		$context = null;
375
		$params="{}";
376
		$immediatly=true;
377
		$rowClass="_json";
378
		extract($parameters);
379
		return $this->_add_event($element, $this->_jsonArray($maskSelector,$url,$method, $params,$jsCallback, $rowClass, $context,$attr), $event, $preventDefault, $stopPropagation,$immediatly);
380
	}
381
382
	/**
383
	 * Prepares a Get ajax request