/** Case history for a Treasure ID * @access public * @return void * @throws Pas_Exception_Param */ public function casehistoryAction() { if ($this->getParam('treasureID', false)) { $treasure = new TreasureCases(); $this->view->cases = $treasure->getCaseHistory($this->_treasureID); $valuations = new TreasureValuations(); $this->view->values = $valuations->listvaluations($this->_treasureID); $curators = new TreasureAssignations(); $this->view->curators = $curators->listCurators($this->_treasureID); $committees = new TvcDatesToCases(); $this->view->tvcs = $committees->listDates($this->_treasureID); $actions = new TreasureActions(); $this->view->actions = $actions->getActionsListed($this->_treasureID); $finals = new AgreedTreasureValuations(); $this->view->finalvalues = $finals->listvaluations($this->_treasureID); } else { throw new Pas_Exception_Param($this->_missingParameter, 500); } }
public function actionAction() { if ($this->_getParam('treasureID', false)) { $form = new TreasureActionForm(); $form->submit->setLabel('Add an action taken'); $this->view->form = $form; if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $data = $form->getValues(); $actions = new TreasureActions(); $insert = $actions->add($data); $this->_redirect($this->_redirect); $this->_flashMessenger->addMessage('New course of action added.'); } else { $form->populate($formData); } } } else { throw new Pas_Exception_Param($this->_missingParameter); } }