diff options
author | michael pereira | 2011-04-08 03:21:00 +0200 |
---|---|---|
committer | michael pereira | 2011-04-08 03:21:00 +0200 |
commit | 906ef8eff141f91bf1628d844db357ca0e29abf6 (patch) | |
tree | 120f879d217758145db760261d451543c4230486 /application/models | |
parent | acl merge (diff) | |
download | pbs2-906ef8eff141f91bf1628d844db357ca0e29abf6.tar.gz pbs2-906ef8eff141f91bf1628d844db357ca0e29abf6.tar.xz pbs2-906ef8eff141f91bf1628d844db357ca0e29abf6.zip |
defaultbootmenu fertig
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/BootMenu.php | 10 | ||||
-rw-r--r-- | application/models/BootMenuMapper.php | 8 |
2 files changed, 14 insertions, 4 deletions
diff --git a/application/models/BootMenu.php b/application/models/BootMenu.php index da4e4d1..c25dad7 100644 --- a/application/models/BootMenu.php +++ b/application/models/BootMenu.php @@ -7,6 +7,7 @@ class Application_Model_BootMenu protected $_groupID; protected $_title; protected $_created; + protected $_defaultbootmenu; public function __construct(array $options = null) { @@ -90,6 +91,15 @@ class Application_Model_BootMenu $this->_created = $_created; return $this; } + public function getDefaultbootmenu() + { + return $this->_defaultbootmenu; + } + public function setDefaultbootmenu($_defaultbootmenu) + { + $this->_defaultbootmenu = $_defaultbootmenu; + return $this; + } /** * Returns current data as associative array using ReflectionClass * diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php index 1043897..1730181 100644 --- a/application/models/BootMenuMapper.php +++ b/application/models/BootMenuMapper.php @@ -74,7 +74,7 @@ class Application_Model_BootMenuMapper public function save(Application_Model_BootMenu $botmenu) { - $data = array('bootmenuID'=> $botmenu->getID() ,'membershipID'=> $botmenu->getMembershipID(), 'groupID'=> $botmenu->getGroupID() ,'title'=> $botmenu->getTitle() ,'created'=> $botmenu->getCreated() ); + $data = array('bootmenuID'=> $botmenu->getID() ,'membershipID'=> $botmenu->getMembershipID(), 'groupID'=> $botmenu->getGroupID() ,'title'=> $botmenu->getTitle() ,'created'=> $botmenu->getCreated(), 'defaultbootmenu' => $botmenu->getDefaultbootmenu()); if (null === ($id = $botmenu->getID()) ) { unset($data['bootmenuID']); @@ -103,10 +103,10 @@ class Application_Model_BootMenuMapper if($botmenu == null){ $botmenu = new Application_Model_BootMenu(); - $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); + $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created)->setDefaultbootmenu($row->defaultbootmenu); return $botmenu; }else{ - $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); + $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created)->setDefaultbootmenu($row->defaultbootmenu); } @@ -119,7 +119,7 @@ class Application_Model_BootMenuMapper foreach ($resultSet as $row) { $entry = new Application_Model_BootMenu(); - $entry->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); + $entry->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created)->setDefault($row->default); $entries[] = $entry; } |