示例#1
0
 /**
  * 'Delete' a project
  *
  */
 public function deleteAction()
 {
     $project = $this->byId();
     $newParent = $this->byId($this->_getParam('newparent'));
     $this->projectService->deleteProject($project, $newParent);
     if ($project->parentid) {
         $this->redirect('project', 'view', array('id' => $project->parentid));
     } else {
         $this->redirect('client', 'view', array('id' => $project->clientid));
     }
 }
示例#2
0
 /**
  * Delete Customer
  * @param sfWebRequest $request
  * @return unknown_type
  */
 public function executeDeleteProject(sfWebRequest $request)
 {
     if (count($request->getParameter('chkLocID')) > 0) {
         $projectService = new ProjectService();
         $projectService->deleteProject($request->getParameter('chkLocID'));
         $this->setMessage('SUCCESS', array(TopLevelMessages::DELETE_SUCCESS));
     } else {
         $this->setMessage('NOTICE', array(TopLevelMessages::SELECT_RECORDS));
     }
     $this->redirect('admin/listProject');
 }