/** * @DI\Observe("log") * * @param LogGenericEvent $event */ public function onLog(LogGenericEvent $event) { if ($event instanceof PotentialEvaluationEndInterface) { $correction = $event->getCorrection(); $this->sendFinishedLog($correction->getDrop()); if ($correction->getDrop()->getUser()->getId() != $correction->getUser()->getId()) { $drop = $this->entityManager->getRepository('InnovaCollecticielBundle:Drop')->findOneBy(array('user' => $correction->getUser())); if ($drop !== null) { $this->sendFinishedLog($drop); } } } }
/** * @DI\Observe("log") * * @param LogGenericEvent $event */ public function onLog(LogGenericEvent $event) { if ($event instanceof PotentialEvaluationEndInterface) { // var_dump('on log !! : '.$event->getAction()); // var_dump('instance of potential evaluation end interface'); $correction = $event->getCorrection(); $this->sendFinishedLog($correction->getDrop()); if ($correction->getDrop()->getUser()->getId() != $correction->getUser()->getId()) { $drop = $this->entityManager->getRepository('IcapDropzoneBundle:Drop')->findOneBy(array('user' => $correction->getUser())); if ($drop !== null) { $this->sendFinishedLog($drop); } } // die(); } }