|
@@ 140-153 (lines=14) @@
|
| 137 |
|
* @param int $id |
| 138 |
|
* @return void |
| 139 |
|
*/ |
| 140 |
|
public function actionDelete($id) |
| 141 |
|
{ |
| 142 |
|
try { |
| 143 |
|
$result = $this->getVisitorRepository()->delete($id); |
| 144 |
|
|
| 145 |
|
$this->logInfo('Destroying of visitor('. $id .') successfull, result: ' . json_encode($result)); |
| 146 |
|
$this->flashSuccess('Položka byla úspěšně smazána'); |
| 147 |
|
} catch(Exception $e) { |
| 148 |
|
$this->logError('Destroying of visitor('. $id .') failed, result: ' . $e->getMessage()); |
| 149 |
|
$this->flashFailure('Destroying of visitor failed, result: ' . $e->getMessage()); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
$this->redirect(self::REDIRECT_DEFAULT); |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
/** |
| 156 |
|
* Prepare mass mail form |
|
@@ 256-268 (lines=13) @@
|
| 253 |
|
* @param integer $id |
| 254 |
|
* @return void |
| 255 |
|
*/ |
| 256 |
|
public function actionChecked($id) |
| 257 |
|
{ |
| 258 |
|
try { |
| 259 |
|
$result = $this->getVisitorRepository()->setChecked($id); |
| 260 |
|
$this->logInfo('Check of visitor('. $id .') successfull, result: ' . json_encode($result)); |
| 261 |
|
$this->flashSuccess('Položka byla úspěšně zkontrolována'); |
| 262 |
|
} catch(Exception $e) { |
| 263 |
|
$this->logError('Check of visitor('. $id .') failed, result: ' . $e->getMessage()); |
| 264 |
|
$this->flashFailure('Check of visitor failed, result: ' . $e->getMessage()); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
$this->redirect(self::REDIRECT_DEFAULT); |
| 268 |
|
} |
| 269 |
|
|
| 270 |
|
/** |
| 271 |
|
* Set item as unchecked by id |
|
@@ 276-288 (lines=13) @@
|
| 273 |
|
* @param integer $id |
| 274 |
|
* @return void |
| 275 |
|
*/ |
| 276 |
|
public function actionUnchecked($id) |
| 277 |
|
{ |
| 278 |
|
try { |
| 279 |
|
$result = $this->getVisitorRepository()->setUnchecked($id); |
| 280 |
|
$this->logInfo('Uncheck of visitor('. $id .') successfull, result: ' . json_encode($result)); |
| 281 |
|
$this->flashSuccess('Položka byla nastavena jako nekontrolována'); |
| 282 |
|
} catch(Exception $e) { |
| 283 |
|
$this->logError('Uncheck of visitor('. $id .') failed, result: ' . $e->getMessage()); |
| 284 |
|
$this->flashFailure('Uncheck of visitor failed, result: ' . $e->getMessage()); |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
$this->redirect(self::REDIRECT_DEFAULT); |
| 288 |
|
} |
| 289 |
|
|
| 290 |
|
/** |
| 291 |
|
* Prepare page for new item |