summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authormichael pereira2011-03-07 13:06:41 +0100
committermichael pereira2011-03-07 13:06:41 +0100
commitebdcf88fbb49e4136d281b3d07f6b212d94223fe (patch)
tree309918413f6a225ba9c991f66bfe12907b4972a3 /application
parentBootMenuEntries angelegt (diff)
downloadpbs2-ebdcf88fbb49e4136d281b3d07f6b212d94223fe.tar.gz
pbs2-ebdcf88fbb49e4136d281b3d07f6b212d94223fe.tar.xz
pbs2-ebdcf88fbb49e4136d281b3d07f6b212d94223fe.zip
Bootmenuentries DB geaendert
Diffstat (limited to 'application')
-rw-r--r--application/models/BootMenuEntries.php10
-rw-r--r--application/models/BootMenuEntriesMapper.php12
2 files changed, 16 insertions, 6 deletions
diff --git a/application/models/BootMenuEntries.php b/application/models/BootMenuEntries.php
index d27fd20..ec42507 100644
--- a/application/models/BootMenuEntries.php
+++ b/application/models/BootMenuEntries.php
@@ -2,6 +2,7 @@
class Application_Model_BootMenuEntries
{
+ protected $_bootmenuentriesID;
protected $_bootosID;
protected $_bootmenuID;
protected $_title;
@@ -45,6 +46,15 @@ class Application_Model_BootMenuEntries
}
return $this;
}
+ public function getID()
+ {
+ return $this->_bootmenuentriesID;
+ }
+ public function setID($_bootmenuentriesID)
+ {
+ $this->_bootmenuentriesID = $_bootmenuentriesID;
+ return $this;
+ }
public function getBootosID()
{
return $this->_bootosID;
diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php
index 2dac085..632d578 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() ,'configID'=> $botmenuentries->getConfigID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() );
+ $data = array('bootmenuentriesID' => $botmenuentries->getID(), 'bootosID'=> $botmenuentries->getBootosID() ,'bootmenuID'=> $botmenuentries->getBootmenuID() ,'configID'=> $botmenuentries->getConfigID() ,'title'=> $botmenuentries->getTitle() ,'kcl'=> $botmenuentries->getKcl() ,'order'=> $botmenuentries->getOrder() );
- if (null === ($id1 = $botmenuentries->getID()) ) {
-
+ if (null === ($id = $botmenuentries->getID()) ) {
+ unset($data['bootmenuentriesID']);
$this->getDbTable()->insert($data);
} else {
- $this->getDbTable()->update($data, array('bootosID = ?' => $id1, 'bootmenuID = ?' => $id2));
+ $this->getDbTable()->update($data, array('bootosID = ?' => $id));
}
}
@@ -60,7 +60,7 @@ class Application_Model_BootMenuEntriesMapper
$row = $result->current();
- $botmenuentries->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order);
+ $botmenuentries->setID($row->bootmenuentriesID)->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)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order);
+ $entry->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setOrder($row->order);
$entries[] = $entry;
}