static function deleteFaq($faqId) { $faq = BaseDao::getFaqById($faqId); $result = new Result(); try { $transaction = GenericDao::beginTransaction(); $faq->deleted = true; BaseDao::updateFaq($faq, $transaction); $transaction->commit(); } catch (\Exception $ex) { $transaction->rollBack(); $result->hasErrors = true; $result->messages = array($ex->getMessage()); } $response = new Response($result, NULL); return json_encode($response); }