diff options
Diffstat (limited to 'application/models/BootMenuEntriesMapper.php')
| -rw-r--r-- | application/models/BootMenuEntriesMapper.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php index 6ef11e3..cf7ba46 100644 --- a/application/models/BootMenuEntriesMapper.php +++ b/application/models/BootMenuEntriesMapper.php @@ -35,10 +35,19 @@ class Application_Model_BootMenuEntriesMapper $data = array('bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() ); if (null === ($id = $botmenuentries->getID()) ) { - unset($data['id']); + unset($data['botmenuentriesID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('id = ?' => $id)); + $this->getDbTable()->update($data, array('botmenuentriesID = ?' => $id)); + } + } + + public function delete(Application_Model_BootMenuEntries $botmenuentries) + { + if (null === ($id = $botmenuentries->getID()) ) { + return; + } else { + $this->getDbTable()->delete(array('botmenuentriesID = ?' => $id)); } } |
