/** *Firm edit ajax **/ public function editAjax($request) { try { $resmapper = new Restaurant_Model_RestaurantMapper(); $cusineMapper = new Restaurant_Model_RestaurantCusineDataMapper(); $rwtMapper = new Restaurant_Model_RestaurantWorkingTimingsMapper(); $postData = $request->getPost(); $data = $postData['data']; $resid = $postData['resid']; if ($request->getPost('type') == "time") { return $rwtMapper->updateRWT($resid, $data); } else { if ($request->getPost('type') == "timeRemove") { return $rwtMapper->removeRWT($data); } else { $arr = array(); foreach ($data as $key => $value) { if ($value['name'] !== "restype_id[]") { $arr[$value['name']] = $value['value']; } else { $cusineMapper->updateCusineData($resid, $value['value']); } } return $resmapper->updateRestaurantDetails($arr, $resid); } } } catch (Exception $ex) { Rdine_Logger_FileLogger::info($ex->getMessage()); throw new Exception($ex->getMessage()); } }