From c2e98ec0e67d0f0221ad05981c32510781f8ce4b Mon Sep 17 00:00:00 2001
From: michael pereira
Date: Mon, 7 Mar 2011 04:56:52 +0100
Subject: BootMenuEntries angelegt
---
application/controllers/BootmenuController.php | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
(limited to 'application/controllers/BootmenuController.php')
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) . "
";
+ echo "Message: " . $e->getMessage() . "
";
+
+ }
+ $this->_redirect('/bootmenu');
+ }
+ }
+
+ $this->view->addbootmenuentryForm = $addbootmenuentryForm;
+
}
public function createbootmenuAction()
--
cgit v1.2.3-55-g7522