public function updateTax(ArrayHash $values) { $tax = new MotivationTax((array) $values); try { $tax->setEditor($this->getUser()->getIdentity()); $this->taxService->updateTax($tax); } catch (Exceptions\DataErrorException $ex) { $this->handleDataSave($values->id, "this", $ex); } $this->redirect("default"); }
private function taxEditorTypeHandle(MotivationTax $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; }