@@ -140,6 +140,22 @@ public function get($url, $responseElement="", $params="{}", $jsCallback=NULL,$h
140140 return $ this ->_get ($ url ,$ params ,$ responseElement ,$ jsCallback ,null ,$ hasLoader ,$ jqueryDone ,$ ajaxTransition ,true );
141141 }
142142
143+ /**
144+ * Performs an ajax request
145+ * @param string $method The http method (get, post, delete, put, head)
146+ * @param string $url The url of the request
147+ * @param string $params JSON parameters
148+ * @param string $responseElement selector of the HTML element displaying the answer
149+ * @param string $jsCallback javascript code to execute after the request
150+ * @param boolean $hasLoader true for showing ajax loader. default : true
151+ * @param string $jqueryDone the jquery function call on ajax data. default:html
152+ * @param string|callable $ajaxTransition
153+ */
154+ public function ajax ($ method ,$ url , $ responseElement ="" , $ params ="{} " , $ jsCallback =NULL ,$ hasLoader =true ,$ jqueryDone ="html " ,$ ajaxTransition =null ) {
155+ $ method =\strtolower ($ method );
156+ return $ this ->_ajax ($ method ,$ url ,$ params ,$ responseElement ,$ jsCallback ,null ,$ hasLoader ,$ jqueryDone ,$ ajaxTransition ,true );
157+ }
158+
143159 /**
144160 * Performs an ajax request and receives the JSON data types by assigning DOM elements with the same name
145161 * @param string $url the request url
0 commit comments