示例#1
0
 private function editorTypeHandle(BaseEntity $e)
 {
     if ($e === null) {
         throw new Exceptions\NullPointerException("Argument Event cannot be null");
     }
     try {
         $editor = null;
         if ($this->getUserService() !== null) {
             $id = $this->getMixId($e->getEditor());
             if ($id !== null) {
                 $editor = $this->getUserService()->getUser($id, false);
             }
         }
         $e->setEditor($editor);
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
 }
示例#2
0
 private function editorTypeHandle(BaseEntity $t)
 {
     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;
 }