diff options
author | Simon | 2011-03-29 11:28:16 +0200 |
---|---|---|
committer | Simon | 2011-03-29 11:28:16 +0200 |
commit | 5ba69509dd69ab4b30fc7e4510f70ba62050054c (patch) | |
tree | 6f21e23babcda605987125af4b3ddf3c770d3872 /application/models | |
parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
download | pbs2-5ba69509dd69ab4b30fc7e4510f70ba62050054c.tar.gz pbs2-5ba69509dd69ab4b30fc7e4510f70ba62050054c.tar.xz pbs2-5ba69509dd69ab4b30fc7e4510f70ba62050054c.zip |
Shortcut und RightCategoryID in Rightmapper hinzugefügt
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/Right.php | 10 | ||||
-rw-r--r-- | application/models/RightMapper.php | 18 |
2 files changed, 25 insertions, 3 deletions
diff --git a/application/models/Right.php b/application/models/Right.php index 874453c..2f49bd9 100644 --- a/application/models/Right.php +++ b/application/models/Right.php @@ -4,6 +4,7 @@ class Application_Model_Right { protected $_rightID; protected $_rightcategoryID; + protected $_shortcut; protected $_title; protected $_description; @@ -62,6 +63,15 @@ class Application_Model_Right { $this->_rightID = $_rightcategoryID; return $this; + } + public function getShortcut() + { + return $this->_shortcut; + } + public function setShortcut($_shortcut) + { + $this->_shortcut = $_shortcut; + return $this; } public function getTitle() { diff --git a/application/models/RightMapper.php b/application/models/RightMapper.php index 023e223..d59f518 100644 --- a/application/models/RightMapper.php +++ b/application/models/RightMapper.php @@ -47,7 +47,11 @@ class Application_Model_RightMapper public function save(Application_Model_Right $right) { - $data = array('rightID'=> $right->getID() ,'title'=> $right->getTitle() ,'description'=> $right->getDescription() ); + $data = array('rightID'=> $right->getID(), + 'rightcategoryID'=> $right->getRightcategoryID(), + 'shortcut'=>$right->getShortcut(), + 'title'=> $right->getTitle() , + 'description'=> $right->getDescription() ); if (null === ($id = $right->getID()) ) { unset($data['rightID']); @@ -76,7 +80,11 @@ class Application_Model_RightMapper $row = $result->current(); $right = new Application_Model_Right(); - $right->setID($row->rightID)->setTitle($row->title)->setDescription($row->description); + $right->setID($row->rightID) + ->setRightcategoryID($row->rightcategoryID) + ->setShortcut($row->shortcut) + ->setTitle($row->title) + ->setDescription($row->description); return $right; } @@ -87,7 +95,11 @@ class Application_Model_RightMapper foreach ($resultSet as $row) { $entry = new Application_Model_Right(); - $entry->setID($row->rightID)->setTitle($row->title)->setDescription($row->description); + $entry->setID($row->rightID) + ->setRightcategoryID($row->rightcategoryID) + ->setShortcut($row->shortcut) + ->setTitle($row->title) + ->setDescription($row->description); $entries[] = $entry; } |