/** Edit a method of discovery
  */
 public function editmethodAction()
 {
     if ($this->_getParam('id', false)) {
         $form = new DiscoMethodsForm();
         $form->submit->setLabel(self::UPDATE);
         $this->view->form = $form;
         if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) {
             if ($form->isValid($form->getValues())) {
                 $methods = new DiscoMethods();
                 $where = array();
                 $where[] = $methods->getAdapter()->quoteInto('id = ?', (int) $this->_getParam('id'));
                 $update = $methods->update($form->getValues(), $where);
                 $this->_flashMessenger->addMessage('Method of discovery information updated!');
                 $this->_redirect($this->_redirectUrl . 'methods');
             } else {
                 $form->populate($form->getValues());
             }
         } else {
             $id = (int) $this->_request->getParam('id', 0);
             if ($id > 0) {
                 $methods = new DiscoMethods();
                 $method = $methods->fetchRow('id=' . $id);
                 if (count($method)) {
                     $form->populate($method->toArray());
                 } else {
                     throw new Pas_Exception_Param($this->_nothingFound);
                 }
             }
         }
     } else {
         throw new Pas_Exception_Param($this->_missingParameter);
     }
 }