| @@ 45-62 (lines=18) @@ | ||
| 42 | /** |
|
| 43 | * @return void |
|
| 44 | */ |
|
| 45 | public function actionCreate() |
|
| 46 | { |
|
| 47 | try { |
|
| 48 | $model = $this->getModel(); |
|
| 49 | $data = $this->getHttpRequest()->getPost(); |
|
| 50 | $result = $this->getModel()->create($data); |
|
| 51 | ||
| 52 | Debugger::log('Creation of category successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 53 | ||
| 54 | $this->flashMessage('Položka byla úspěšně vytvořena', 'ok'); |
|
| 55 | } catch(Exception $e) { |
|
| 56 | Debugger::log('Creation of category with data ' . json_encode($data) . ' failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 57 | ||
| 58 | $this->flashMessage('Creation of category failed, result: ' . $e->getMessage(), 'error'); |
|
| 59 | } |
|
| 60 | ||
| 61 | $this->redirect('Category:listing'); |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @param integer $id |
|
| @@ 26-41 (lines=16) @@ | ||
| 23 | /** |
|
| 24 | * @return void |
|
| 25 | */ |
|
| 26 | public function actionCreate() |
|
| 27 | { |
|
| 28 | try { |
|
| 29 | $model = $this->getModel(); |
|
| 30 | $data = $this->getHttpRequest()->getPost(); |
|
| 31 | $result = $this->getModel()->create($data); |
|
| 32 | ||
| 33 | Debugger::log('Creation of meeting successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 34 | $this->flashMessage('Položka byla úspěšně vytvořena', 'ok'); |
|
| 35 | } catch(Exception $e) { |
|
| 36 | Debugger::log('Creation of meeting with data ' . json_encode($data) . ' failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 37 | $this->flashMessage('Creation of meeting failed, result: ' . $e->getMessage(), 'error'); |
|
| 38 | } |
|
| 39 | ||
| 40 | $this->redirect('Meeting:listing'); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * @param integer $id |
|