|
@@ 348-357 (lines=10) @@
|
| 345 |
|
$form = $this->getServiceLocator()->get('playgroundgame_sharemail_form'); |
| 346 |
|
$form->setAttribute('method', 'post'); |
| 347 |
|
|
| 348 |
|
if ($this->getRequest()->isPost()) { |
| 349 |
|
$data = $this->getRequest()->getPost()->toArray(); |
| 350 |
|
$form->setData($data); |
| 351 |
|
if ($form->isValid()) { |
| 352 |
|
$result = $this->getGameService()->sendShareMail($data, $this->game, $user, $lastEntry); |
| 353 |
|
if ($result) { |
| 354 |
|
$statusMail = true; |
| 355 |
|
} |
| 356 |
|
} |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
// Je recherche le post associé à entry + status == 0. Si non trouvé, je redirige vers home du jeu. |
| 360 |
|
$post = $this->getGameService()->getPostVotePostMapper()->findOneBy(array('entry' => $lastEntry)); |
|
@@ 692-701 (lines=10) @@
|
| 689 |
|
$form = $this->getServiceLocator()->get('playgroundgame_sharemail_form'); |
| 690 |
|
$form->setAttribute('method', 'post'); |
| 691 |
|
|
| 692 |
|
if ($this->getRequest()->isPost()) { |
| 693 |
|
$data = $this->getRequest()->getPost()->toArray(); |
| 694 |
|
$form->setData($data); |
| 695 |
|
if ($form->isValid()) { |
| 696 |
|
$result = $this->getGameService()->sendShareMail($data, $this->game, $user, $lastEntry); |
| 697 |
|
if ($result) { |
| 698 |
|
$statusMail = true; |
| 699 |
|
} |
| 700 |
|
} |
| 701 |
|
} |
| 702 |
|
|
| 703 |
|
$viewModel = $this->buildView($this->game); |
| 704 |
|
|