Beispiel #1
0
 /**
  * @Route("/pool-update/{listUrl}", name="pool_update")
  * @Template()
  */
 public function sendPoolUpdateAction($listUrl)
 {
     $results = $this->get('intracto_secret_santa.entry')->fetchDataForPoolUpdateMail($listUrl);
     $this->getPool($listUrl);
     $this->get('intracto_secret_santa.mail')->sendPoolUpdateMailForPool($this->pool, $results);
     $this->get('session')->getFlashBag()->add('success', $this->get('translator')->trans('flashes.pool_update.success'));
     return $this->redirect($this->generateUrl('pool_manage', ['listUrl' => $this->pool->getListurl()]));
 }
Beispiel #2
0
 /**
  * @Route("/manage/{listUrl}", name="pool_manage")
  * @Template()
  */
 public function manageAction($listUrl)
 {
     $this->getPool($listUrl);
     if (!$this->pool->getCreated()) {
         return $this->redirect($this->generateUrl('pool_exclude', array('listUrl' => $this->pool->getListurl())));
     }
     if ($this->pool->getSentdate() === null) {
         $translator = $this->get('translator');
         $this->get('session')->getFlashBag()->add('success', $translator->trans('flashes.manage.email_validated'));
         /** @var \Intracto\SecretSantaBundle\Entity\EntryService $entryService */
         $entryService = $this->get('intracto_secret_santa.entry_service');
         $entryService->sendSecretSantaMailsForPool($this->pool);
     }
     return array('pool' => $this->pool, 'delete_pool_csrf_token' => $this->get('security.csrf.token_manager')->getToken('delete_pool'), 'expose_pool_csrf_token' => $this->get('security.csrf.token_manager')->getToken('expose_pool'));
 }