public function deleteAction() { if ($id = $this->getRequest()->getParam('message_id')) { $message = new Push_Model_Message(); $message->find($id); $message->delete(); $data = array('success' => 1, 'success_message' => $this->_('Push successfully deleted.'), 'message_loader' => 0, 'message_button' => 0, 'message_timeout' => 2); } else { $datas = array('error' => 1, 'message' => $this->_('An error occurred while deleting the push. Please try again later.')); } $this->getLayout()->setHtml(Zend_Json::encode($data)); }