Exemplo n.º 1
0
 /**
  * deleteAction for Contacts
  *
  * @return void
  */
 public function deleteAction()
 {
     if ($this->getRequest()->isPost()) {
         $del = $this->getRequest()->getPost('del');
         if ($del == 'Yes') {
             $id = $this->getRequest()->getPost('id');
             $company_id = $this->getRequest()->getPost('company_id');
             $model = new Company_Model_Contact();
             $model->delete($id);
             return $this->_helper->_redirector->gotoSimple('index', 'company', 'company');
         }
     } else {
         $id = $this->_getParam('id', 0);
         if ($id > 0) {
             $model = new Company_Model_Contact();
             $this->view->contact = $model->fetchEntry($id);
         }
     }
 }