Ejemplo n.º 1
0
 protected function processReply(Support $issue, $issue_id, $forwardMessage, $output)
 {
     $em = $this->getContainer()->get('doctrine.orm.entity_manager');
     $repo = $em->getRepository('ActsCamdramAdminBundle:Support');
     if (($orig = $repo->findOneById($issue_id)) !== null) {
         $issue->setParent($orig);
         //Reopen issue if it's been closed
         if ($issue->getOriginal()->getOwner()) {
             $issue->getOriginal()->setState(Support::STATE_ASSIGNED);
         } else {
             $issue->getOriginal()->setState(Support::STATE_UNASSIGNED);
         }
         $em->persist($issue);
         $em->flush();
         if ($forwardMessage) {
             $this->forwardEmail($issue, $output);
         }
     }
 }