示例#1
0
 private function response(Notification $notification, TreatNotifications $treatNotifications, $status)
 {
     $notification->setResponseText($treatNotifications->getResponse());
     $notification->setResponseTimestamp(new \DateTime());
     $notification->setResponseBy($this->userService->getCurrentUser()->getUsername());
     $notification->setStatus($status);
     $em = $this->doctrine->getManager();
     $em->persist($notification);
     $em->flush();
     try {
         $this->sendEmail($notification);
     } catch (\Exception $e) {
     }
     $this->session->getFlashBag()->add('notice', '<i class="' . $notification->getTemplateId()->getIcon() . '"></i> ' . $notification->getTemplateId()->getName() . ' for ' . $notification->getRevisionId() . ' has been ' . $notification->getStatus());
 }