| @@ 68-84 (lines=17) @@ | ||
| 65 | * @param integer $id |
|
| 66 | * @return void |
|
| 67 | */ |
|
| 68 | public function actionUpdate($id) |
|
| 69 | { |
|
| 70 | try { |
|
| 71 | $data = $this->getHttpRequest()->getPost(); |
|
| 72 | $result = $this->getModel()->update($id, $data); |
|
| 73 | ||
| 74 | Debugger::log('Modification of category id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 75 | ||
| 76 | $this->flashMessage('Položka byla úspěšně upravena', 'ok'); |
|
| 77 | } catch(Exception $e) { |
|
| 78 | Debugger::log('Modification of category id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 79 | ||
| 80 | $this->flashMessage('Modification of category id ' . $id . ' failed, result: ' . $e->getMessage(), 'error'); |
|
| 81 | } |
|
| 82 | ||
| 83 | $this->redirect('Category:listing'); |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * @return void |
|
| @@ 47-61 (lines=15) @@ | ||
| 44 | * @param integer $id |
|
| 45 | * @return void |
|
| 46 | */ |
|
| 47 | public function actionUpdate($id) |
|
| 48 | { |
|
| 49 | try { |
|
| 50 | $data = $this->getHttpRequest()->getPost(); |
|
| 51 | $result = $this->getModel()->update($id, $data); |
|
| 52 | ||
| 53 | Debugger::log('Modification of meeting id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 54 | $this->flashMessage('Položka byla úspěšně upravena', 'ok'); |
|
| 55 | } catch(Exception $e) { |
|
| 56 | Debugger::log('Modification of meeting id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 57 | $this->flashMessage('Modification of meeting id ' . $id . ' failed, result: ' . $e->getMessage(), 'error'); |
|
| 58 | } |
|
| 59 | ||
| 60 | $this->redirect('Meeting:listing'); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * Delete item |
|