Пример #1
0
 public function deleteAction()
 {
     // action body
     $id = $this->_request->getParam('id');
     if (!empty($id)) {
         $post_model = new Application_Model_Post();
         $post_model->deletePost($id);
     }
     $this->redirect('/');
 }
Пример #2
0
 public function deleteAction()
 {
     $post = new Application_Model_Post();
     $post->deletePost($this->_request->getParam('id'));
     $this->redirect('/post/list/');
 }