Esempio n. 1
0
 public function deletereverserulerAction()
 {
     $reverses = new RulerRevType();
     $where = $reverses->getAdapter()->quoteInto('id = ?', (int) $this->_getParam('id'));
     $reverses->delete($where);
 }
 /** Link a ruler to a reverse
  */
 public function rulertoreversetypeAction()
 {
     $form = new AddReverseToRulerForm();
     $rulerid = $this->getParam('rulerid');
     $form->rulerID->setValue($rulerid);
     $reversetypes = new RevTypes();
     $reversetypesList = $reversetypes->getRevTypes();
     $form->reverseID->addMultiOptions($reversetypesList);
     $this->view->form = $form;
     if ($this->_request->isPost()) {
         if ($form->isValid($this->_request->getPost())) {
             $reverses = new RulerRevType();
             $reverses->add($form->getValues());
             $this->getFlash()->addMessage('A new mint has been entered.');
             $this->redirect($this->_redirectUrl . 'romanruler/id/' . $rulerid);
         } else {
             $this->getFlash()->addMessage($this->_formErrors);
             $form->populate($this->_request->getPost());
         }
     }
 }