public function onRegistrationPaid(RegistrationEvent $event)
 {
     $registration = $event->getRegistration();
     $user = $registration->getUser();
     $systemMailer = $this->container->get('system_mailer');
     $systemMailer->send('App:confirmed_registration', ['user' => $user, 'registration' => $registration], 'es');
 }
예제 #2
0
 public function onRegistrationConfirmed(RegistrationEvent $event)
 {
     $registration = $event->getRegistration();
     $hoy = date("d-m-Y");
     $this->loggableGenerator->generateFromHtml($this->twig_Environment->render(':themes/invoice:invoice.html.twig', array('registration' => $registration, 'amount' => $registration->getAmount(), 'fecha' => $hoy)), $this->kernel->getRootDir() . '/../private/documents/invoices/' . $registration->getId() . '.pdf', array(), true);
     foreach ($registration->getParticipants() as $participant) {
         $this->loggableGenerator->generateFromHtml($this->twig_Environment->render(':themes/acreditation:acreditation.html.twig', array('participant' => $participant, 'registration' => $registration)), $this->kernel->getRootDir() . '/../private/documents/acreditations/' . $participant->getId() . '.pdf', array(), true);
     }
 }