| @@ 936-945 (lines=10) @@ | ||
| 933 | $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form'); |
|
| 934 | $form->setAttribute('method', 'post'); |
|
| 935 | ||
| 936 | if ($this->getRequest()->isPost()) { |
|
| 937 | $data = $this->getRequest()->getPost()->toArray(); |
|
| 938 | $form->setData($data); |
|
| 939 | if ($form->isValid()) { |
|
| 940 | $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry); |
|
| 941 | if ($result) { |
|
| 942 | $statusMail = true; |
|
| 943 | } |
|
| 944 | } |
|
| 945 | } |
|
| 946 | ||
| 947 | $viewModel = $this->buildView($this->game); |
|
| 948 | ||
| @@ 601-610 (lines=10) @@ | ||
| 598 | // buildView must be before sendMail because it adds the game template path to the templateStack |
|
| 599 | $viewModel = $this->buildView($this->game); |
|
| 600 | ||
| 601 | if ($this->getRequest()->isPost()) { |
|
| 602 | $data = $this->getRequest()->getPost()->toArray(); |
|
| 603 | $form->setData($data); |
|
| 604 | if ($form->isValid()) { |
|
| 605 | $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry); |
|
| 606 | if ($result) { |
|
| 607 | $statusMail = true; |
|
| 608 | } |
|
| 609 | } |
|
| 610 | } |
|
| 611 | ||
| 612 | $viewModel->setVariables(array( |
|
| 613 | 'statusMail' => $statusMail, |
|