public function detailsAction() { if ($this->_getParam('id', false)) { $id = $this->_getParam('id'); $tvcdates = new TvcDates(); $this->view->details = $tvcdates->getDetails($id); $this->view->images = $tvcdates->getImages($id); $tvccases = new TvcDatesToCases(); $this->view->cases = $tvccases->listCases($id); } else { throw new Pas_Exception_Param($this->_missingParameter); } }
public function tvcAction() { if ($this->_getParam('treasureID', false)) { $form = new TVCDateForm(); $form->submit->setLabel('Assign to meeting date'); $this->view->form = $form; if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $data = $form->getValues(); $dates = new TvcDatesToCases(); $insert = $dates->add($data); $this->_redirect($this->_redirect); $this->_flashMessenger->addMessage('Curator has been assigned.'); } else { $form->populate($formData); } } } else { throw new Pas_Exception_Param($this->_missingParameter); } }