Пример #1
0
 /**
  * @param AssistanceRequest $entity
  * @param EntityManagerInterface $em
  */
 private function persistEvent(AssistanceRequest $entity, EntityManagerInterface $em)
 {
     $event = new AssistanceEvent();
     $event->setAssistanceRequest($entity);
     $event->setAssistanceRequestStatus($entity->getStatus());
     $event->setUser($entity->getHelper());
     $em->persist($event);
     $em->flush();
 }
Пример #2
0
 /**
  * Remove event
  *
  * @param \NFQ\AssistanceBundle\Entity\AssistanceEvent $event
  */
 public function removeEvent(\NFQ\AssistanceBundle\Entity\AssistanceEvent $event)
 {
     $this->events->removeElement($event);
 }