Пример #1
0
 public function deleteAction()
 {
     if ($this->has('id')) {
         $doc = new Wsm_Document();
         $doc->setId($this->get('id'));
         $dbService = new Wsm_Db_Documents();
         if ($dbService->delete($doc)) {
             $this->redirect($this->getBaseUrl() . '&msg=saved', true);
         }
     }
     $this->redirect($this->getBaseUrl() . '&msg=save_error', true);
 }