Example #1
0
 public function action_delete()
 {
     $this->template->page_title = 'Delete Page';
     $page_id = $this->request->param('id');
     if (!$page_id) {
         throw new Exception('ID must not be empty!');
     }
     $page = new Model_Page();
     $delete_page = $page->delete_page($page_id);
     if (!$delete_page) {
         throw new Exception('Error with deleting page!');
     }
     $this->request->redirect('cp/pages');
 }