Code Duplication    Length = 12-13 lines in 2 locations

Ajax/common/traits/JsUtilsAjaxTrait.php 2 locations

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