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/models | |
| parent | BootIso Interface fertig (diff) | |
| download | pbs2-c2e98ec0e67d0f0221ad05981c32510781f8ce4b.tar.gz pbs2-c2e98ec0e67d0f0221ad05981c32510781f8ce4b.tar.xz pbs2-c2e98ec0e67d0f0221ad05981c32510781f8ce4b.zip | |
BootMenuEntries angelegt
Diffstat (limited to 'application/models')
| -rw-r--r-- | application/models/BootMenuEntries.php | 10 | ||||
| -rw-r--r-- | application/models/BootMenuEntriesMapper.php | 14 |
2 files changed, 17 insertions, 7 deletions
diff --git a/application/models/BootMenuEntries.php b/application/models/BootMenuEntries.php index 9b6985c..d27fd20 100644 --- a/application/models/BootMenuEntries.php +++ b/application/models/BootMenuEntries.php @@ -6,6 +6,7 @@ class Application_Model_BootMenuEntries protected $_bootmenuID; protected $_title; protected $_kcl; + protected $_configID; protected $_order; public function __construct(array $options = null) @@ -80,6 +81,15 @@ class Application_Model_BootMenuEntries $this->_kcl = $_kcl; return $this; } + public function getConfigID() + { + return $this->_configID; + } + public function setConfigID($_configID) + { + $this->_configID = $_configID; + return $this; + } public function getOrder() { return $this->_order; diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php index cf7ba46..2dac085 100644 --- a/application/models/BootMenuEntriesMapper.php +++ b/application/models/BootMenuEntriesMapper.php @@ -32,13 +32,13 @@ class Application_Model_BootMenuEntriesMapper public function save(Application_Model_BootMenuEntries $botmenuentries) { - $data = array('bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() ); + $data = array('bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'configID'=> $botmenuentries->getConfigID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() ); - if (null === ($id = $botmenuentries->getID()) ) { - unset($data['botmenuentriesID']); + if (null === ($id1 = $botmenuentries->getID()) ) { + $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('botmenuentriesID = ?' => $id)); + $this->getDbTable()->update($data, array('bootosID = ?' => $id1, 'bootmenuID = ?' => $id2)); } } @@ -47,7 +47,7 @@ class Application_Model_BootMenuEntriesMapper if (null === ($id = $botmenuentries->getID()) ) { return; } else { - $this->getDbTable()->delete(array('botmenuentriesID = ?' => $id)); + $this->getDbTable()->delete(array('bootmenuentriesID = ?' => $id)); } } @@ -60,7 +60,7 @@ class Application_Model_BootMenuEntriesMapper $row = $result->current(); - $botmenuentries->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setKcl($row->kcl)->setOrder($row->order); + $botmenuentries->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order); } public function fetchAll() @@ -70,7 +70,7 @@ class Application_Model_BootMenuEntriesMapper foreach ($resultSet as $row) { $entry = new Application_Model_BootMenuEntries(); - $entry->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setKcl($row->kcl)->setOrder($row->order); + $entry->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order); $entries[] = $entry; } |
