示例#1
0
 private function saveMailboxEntry(MailBoxEntry $mb)
 {
     $toObject = $this->userService->getUser($this->getMixId($mb->getRecipient()), false);
     $fromObject = $this->userService->getUser($this->getMixId($mb->getSender()), false);
     $mb->setOwner($toObject);
     $mb->setRecipient($toObject);
     $mb->setSender($fromObject);
     $this->mailboxDao->save($mb);
 }
示例#2
0
 public function createTax(MotivationTax $t)
 {
     try {
         $t->setUpdated(new DateTime());
         $t->setOrderedDate(new DateTime());
         $this->taxEditorTypeHandle($t);
         $this->taxSeasonTypeHandle($t);
         $this->taxSportGroupTypeHandle($t);
         $this->taxDao->save($t);
         $this->invalidateEntityCache($t);
         $this->onCreate($t);
     } catch (DuplicateEntryException $ex) {
         $this->logWarning($ex->getMessage());
         throw new Exceptions\DuplicateEntryException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
 }