|
@@ 135-152 (lines=18) @@
|
| 132 |
|
* |
| 133 |
|
* @return void |
| 134 |
|
*/ |
| 135 |
|
public function actionCreate() |
| 136 |
|
{ |
| 137 |
|
try { |
| 138 |
|
$postData = $this->getHttpRequest()->getPost(); |
| 139 |
|
$postData['meeting'] = $this->getMeetingId(); |
| 140 |
|
|
| 141 |
|
$guid = $this->getVisitorService()->create($postData); |
| 142 |
|
$result = $this->sendRegistrationSummary($postData, $guid); |
| 143 |
|
|
| 144 |
|
Debugger::log('Creation of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO); |
| 145 |
|
$this->flashMessage('Registrace(' . $guid . ') byla úspěšně založena.', self::FLASH_TYPE_OK); |
| 146 |
|
} catch(Exception $e) { |
| 147 |
|
Debugger::log('Creation of registration('. $guid .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
| 148 |
|
$this->flashMessage('Creation of registration failed, result: ' . $e->getMessage(), self::FLASH_TYPE_ERROR); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
$this->redirect('Registration:check', $guid); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
/** |
| 155 |
|
* @param string $guid |
|
@@ 158-174 (lines=17) @@
|
| 155 |
|
* @param string $guid |
| 156 |
|
* @return void |
| 157 |
|
*/ |
| 158 |
|
public function actionUpdate($guid) |
| 159 |
|
{ |
| 160 |
|
try { |
| 161 |
|
$postData = $this->getHttpRequest()->getPost(); |
| 162 |
|
|
| 163 |
|
$result = $this->getVisitorService()->update($guid, $postData); |
| 164 |
|
$result = $this->sendRegistrationSummary($postData, $guid); |
| 165 |
|
|
| 166 |
|
Debugger::log('Modification of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO); |
| 167 |
|
$this->flashMessage('Registrace(' . $guid . ') byla úspěšně upravena.', self::FLASH_TYPE_OK); |
| 168 |
|
} catch(Exception $e) { |
| 169 |
|
Debugger::log('Modification of registration('. $guid .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
| 170 |
|
$this->flashMessage('Modification of registration(' . $guid . ') failed, result: ' . $e->getMessage(), self::FLASH_TYPE_ERROR); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
$this->redirect('Registration:check', $guid); |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
/** |
| 177 |
|
* @return void |