diff options
Diffstat (limited to 'application/controllers/BootmenuController.php')
| -rw-r--r-- | application/controllers/BootmenuController.php | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/application/controllers/BootmenuController.php b/application/controllers/BootmenuController.php index e20ef23..1dfa641 100644 --- a/application/controllers/BootmenuController.php +++ b/application/controllers/BootmenuController.php @@ -16,7 +16,31 @@ class BootmenuController extends Zend_Controller_Action public function addbootmenuentryAction() { - // action body + if (!isset($_POST["addbootmenuentry"])){ + $addbootmenuentryForm = new Application_Form_BootmenuEntriesAdd(); + } else { + + $addbootmenuentryForm = new Application_Form_BootmenuEntriesAdd($_POST); + + if ($addbootmenuentryForm->isValid($_POST)) { + + $bootmenuentry = new Application_Model_BootMenuEntries($_POST); + $bootmenuentrymapper = new Application_Model_BootMenuEntriesMapper(); + + try { + $bootmenuentrymapper->save($bootmenuentry); + }catch(Zend_Exception $e) + { + echo "Caught exception: " . get_class($e) . "<br/>"; + echo "Message: " . $e->getMessage() . "<br/>"; + + } + $this->_redirect('/bootmenu'); + } + } + + $this->view->addbootmenuentryForm = $addbootmenuentryForm; + } public function createbootmenuAction() |
