Example #1
0
 public function updateEntry(ArrayHash $values)
 {
     $e = new MotivationEntry((array) $values);
     try {
         $e->setEditor($this->getUser()->getIdentity());
         $this->entryService->updateEntry($e);
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataLoad($values->id, "this", $ex);
     }
     $this->redirect("default");
 }
 private function entryEditorTypeHandle(MotivationEntry $t)
 {
     if ($t == null) {
         throw new Exceptions\NullPointerException("Argument MotivationTax cannot be null");
     }
     try {
         $u = $this->getMixId($t->getEditor());
         if ($u !== null) {
             $editor = $this->userService->getUser($u, false);
             $t->setEditor($editor);
         }
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
     return $t;
 }