コード例 #1
0
 /** Render individual role
  * @access public
  * @return void
  * @throws Pas_Exception_Param
  */
 public function roleAction()
 {
     if ($this->getParam('id', false)) {
         $this->view->vols = $this->_volunteers->getOppDetails($this->getParam('id'));
     } else {
         throw new Pas_Exception_Param($this->_missingParameter, 500);
     }
 }
コード例 #2
0
 /** Delete a vacancy
  * @access public
  * @return void
  */
 public function deleteAction()
 {
     if ($this->_request->isPost()) {
         $id = (int) $this->getParam('id');
         $del = $this->_request->getPost('del');
         if ($del == 'Yes' && $id > 0) {
             $where = 'id = ' . (int) $id;
             $this->_volunteers->delete($where);
             $this->getFlash()->addMessage('Record deleted');
         }
         $this->redirect(self::REDIRECT);
     } else {
         $this->view->opp = $this->_volunteers->fetchRow('id = ' . $this->_request->getParam('id'));
     }
 }