diff options
| author | michael pereira | 2011-03-07 04:56:52 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-07 04:56:52 +0100 |
| commit | c2e98ec0e67d0f0221ad05981c32510781f8ce4b (patch) | |
| tree | 392515126ebca6b6c7d93d8b05a535e76a8c90c1 /application/controllers/BootmenuController.php | |
| parent | BootIso Interface fertig (diff) | |
| download | pbs2-c2e98ec0e67d0f0221ad05981c32510781f8ce4b.tar.gz pbs2-c2e98ec0e67d0f0221ad05981c32510781f8ce4b.tar.xz pbs2-c2e98ec0e67d0f0221ad05981c32510781f8ce4b.zip | |
BootMenuEntries angelegt
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() |
