|
@@ 165-182 (lines=18) @@
|
| 162 |
|
* |
| 163 |
|
* @return void |
| 164 |
|
*/ |
| 165 |
|
public function actionCreate() |
| 166 |
|
{ |
| 167 |
|
try { |
| 168 |
|
$postData = $this->getHttpRequest()->getPost(); |
| 169 |
|
$postData['meeting'] = $this->getMeetingId(); |
| 170 |
|
|
| 171 |
|
$guid = $this->getVisitorService()->create($postData); |
| 172 |
|
$result = $this->sendRegistrationSummary($postData, $guid); |
| 173 |
|
|
| 174 |
|
Debugger::log('Creation of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO); |
| 175 |
|
$this->flashMessage('Registrace(' . $guid . ') byla úspěšně založena.', self::FLASH_TYPE_OK); |
| 176 |
|
} catch(Exception $e) { |
| 177 |
|
Debugger::log('Creation of registration('. $guid .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
| 178 |
|
$this->flashMessage('Creation of registration failed, result: ' . $e->getMessage(), self::FLASH_TYPE_ERROR); |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
$this->redirect('Registration:check', $guid); |
| 182 |
|
} |
| 183 |
|
|
| 184 |
|
/** |
| 185 |
|
* @param string $guid |
|
@@ 188-204 (lines=17) @@
|
| 185 |
|
* @param string $guid |
| 186 |
|
* @return void |
| 187 |
|
*/ |
| 188 |
|
public function actionUpdate($guid) |
| 189 |
|
{ |
| 190 |
|
try { |
| 191 |
|
$postData = $this->getHttpRequest()->getPost(); |
| 192 |
|
|
| 193 |
|
$result = $this->getVisitorService()->update($guid, $postData); |
| 194 |
|
$result = $this->sendRegistrationSummary($postData, $guid); |
| 195 |
|
|
| 196 |
|
Debugger::log('Modification of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO); |
| 197 |
|
$this->flashMessage('Registrace(' . $guid . ') byla úspěšně upravena.', self::FLASH_TYPE_OK); |
| 198 |
|
} catch(Exception $e) { |
| 199 |
|
Debugger::log('Modification of registration('. $guid .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
| 200 |
|
$this->flashMessage('Modification of registration(' . $guid . ') failed, result: ' . $e->getMessage(), self::FLASH_TYPE_ERROR); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
$this->redirect('Registration:check', $guid); |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
/** |
| 207 |
|
* @return void |