| @@ 98-114 (lines=17) @@ | ||
| 95 | return $viewModel; |
|
| 96 | } |
|
| 97 | ||
| 98 | public function fbshareAction() |
|
| 99 | { |
|
| 100 | $result = parent::fbshareAction(); |
|
| 101 | $bonusEntry = false; |
|
| 102 | ||
| 103 | if ($result->getVariable('success')) { |
|
| 104 | $bonusEntry = $this->getGameService()->addAnotherChance($this->game, $this->user, 1); |
|
| 105 | } |
|
| 106 | ||
| 107 | $response = $this->getResponse(); |
|
| 108 | $response->setContent(\Zend\Json\Json::encode(array( |
|
| 109 | 'success' => $result, |
|
| 110 | 'playBonus' => $bonusEntry |
|
| 111 | ))); |
|
| 112 | ||
| 113 | return $response; |
|
| 114 | } |
|
| 115 | ||
| 116 | public function fbrequestAction() |
|
| 117 | { |
|
| @@ 116-132 (lines=17) @@ | ||
| 113 | return $response; |
|
| 114 | } |
|
| 115 | ||
| 116 | public function fbrequestAction() |
|
| 117 | { |
|
| 118 | $result = parent::fbrequestAction(); |
|
| 119 | $bonusEntry = false; |
|
| 120 | ||
| 121 | if ($result->getVariable('success')) { |
|
| 122 | $bonusEntry = $this->getGameService()->addAnotherChance($this->game, $this->user, 1); |
|
| 123 | } |
|
| 124 | ||
| 125 | $response = $this->getResponse(); |
|
| 126 | $response->setContent(\Zend\Json\Json::encode(array( |
|
| 127 | 'success' => $result, |
|
| 128 | 'playBonus' => $bonusEntry |
|
| 129 | ))); |
|
| 130 | ||
| 131 | return $response; |
|
| 132 | } |
|
| 133 | ||
| 134 | public function tweetAction() |
|
| 135 | { |
|
| @@ 134-150 (lines=17) @@ | ||
| 131 | return $response; |
|
| 132 | } |
|
| 133 | ||
| 134 | public function tweetAction() |
|
| 135 | { |
|
| 136 | $result = parent::tweetAction(); |
|
| 137 | $bonusEntry = false; |
|
| 138 | ||
| 139 | if ($result->getVariable('success')) { |
|
| 140 | $bonusEntry = $this->getGameService()->addAnotherChance($this->game, $this->user, 1); |
|
| 141 | } |
|
| 142 | ||
| 143 | $response = $this->getResponse(); |
|
| 144 | $response->setContent(\Zend\Json\Json::encode(array( |
|
| 145 | 'success' => $result, |
|
| 146 | 'playBonus' => $bonusEntry |
|
| 147 | ))); |
|
| 148 | ||
| 149 | return $response; |
|
| 150 | } |
|
| 151 | ||
| 152 | public function googleAction() |
|
| 153 | { |
|
| @@ 152-168 (lines=17) @@ | ||
| 149 | return $response; |
|
| 150 | } |
|
| 151 | ||
| 152 | public function googleAction() |
|
| 153 | { |
|
| 154 | $result = parent::googleAction(); |
|
| 155 | $bonusEntry = false; |
|
| 156 | ||
| 157 | if ($result->getVariable('success')) { |
|
| 158 | $bonusEntry = $this->getGameService()->addAnotherChance($this->game, $this->user, 1); |
|
| 159 | } |
|
| 160 | ||
| 161 | $response = $this->getResponse(); |
|
| 162 | $response->setContent(\Zend\Json\Json::encode(array( |
|
| 163 | 'success' => $result, |
|
| 164 | 'playBonus' => $bonusEntry |
|
| 165 | ))); |
|
| 166 | ||
| 167 | return $response; |
|
| 168 | } |
|
| 169 | ||
| 170 | public function getGameService() |
|
| 171 | { |
|