diff options
| author | michael pereira | 2011-03-06 20:12:36 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-06 20:12:36 +0100 |
| commit | 0e017ebdc1edbbf230f0f0160f103c39ef675725 (patch) | |
| tree | e7848e531d30a01145f2f98d8a3189ea6699c54d /application/models/BootMenuMapper.php | |
| parent | Config fertig (diff) | |
| download | pbs2-0e017ebdc1edbbf230f0f0160f103c39ef675725.tar.gz pbs2-0e017ebdc1edbbf230f0f0160f103c39ef675725.tar.xz pbs2-0e017ebdc1edbbf230f0f0160f103c39ef675725.zip | |
datenbank erweitert, BootMenu, Config fertig
Diffstat (limited to 'application/models/BootMenuMapper.php')
| -rw-r--r-- | application/models/BootMenuMapper.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php index fa9b8a7..51e85ef 100644 --- a/application/models/BootMenuMapper.php +++ b/application/models/BootMenuMapper.php @@ -32,13 +32,13 @@ class Application_Model_BootMenuMapper public function save(Application_Model_BootMenu $botmenu) { - $data = array('bootmenuID'=> $botmenu->getBootmenuID() ,'membershipID'=> $botmenu->getMembershipID() ,'title'=> $botmenu->getTitle() ,'time'=> $botmenu->getTime() ); + $data = array('bootmenuID'=> $botmenu->getID() ,'membershipID'=> $botmenu->getMembershipID(), 'groupID'=> $botmenu->getGroupID() ,'title'=> $botmenu->getTitle() ,'created'=> $botmenu->getCreated() ); if (null === ($id = $botmenu->getID()) ) { - unset($data['botmenuID']); + unset($data['bootmenuID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('botmenuID = ?' => $id)); + $this->getDbTable()->update($data, array('bootmenuID = ?' => $id)); } } @@ -47,7 +47,7 @@ class Application_Model_BootMenuMapper if (null === ($id = $botmenu->getID()) ) { return; } else { - $this->getDbTable()->delete(array('botmenuID = ?' => $id)); + $this->getDbTable()->delete(array('bootmenuID = ?' => $id)); } } @@ -60,7 +60,7 @@ class Application_Model_BootMenuMapper $row = $result->current(); - $botmenu->setBootmenuID($row->bootmenuID)->setMembershipID($row->membershipID)->setTitle($row->title)->setTime($row->time); + $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); } public function fetchAll() @@ -70,7 +70,7 @@ class Application_Model_BootMenuMapper foreach ($resultSet as $row) { $entry = new Application_Model_BootMenu(); - $entry->setBootmenuID($row->bootmenuID)->setMembershipID($row->membershipID)->setTitle($row->title)->setTime($row->time); + $entry->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); $entries[] = $entry; } |
