summaryrefslogtreecommitdiffstats
path: root/application/controllers/BootosController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/BootosController.php')
-rw-r--r--application/controllers/BootosController.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/application/controllers/BootosController.php b/application/controllers/BootosController.php
index a644a5c..d052503 100644
--- a/application/controllers/BootosController.php
+++ b/application/controllers/BootosController.php
@@ -11,13 +11,30 @@ class BootosController extends Zend_Controller_Action
public function indexAction()
{
$bootosmapper = new Application_Model_BootOsMapper();
+
+ $groupmapper = new Application_Model_GroupMapper();
+ $membershipmapper = new Application_Model_MembershipMapper();
+ $personmapper = new Application_Model_PersonMapper();
+ $configmapper = new Application_Model_ConfigMapper();
+
$this->view->bootoslist = $bootosmapper->fetchAll();
+
+ foreach ($this->view->bootoslist as $bootos){
+ $bootos->setGroupID("[".$bootos->getGroupID()."] ".$groupmapper->find($bootos->getGroupID())->getTitle());
+ $bootos->setMembershipID("[".$bootos->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootos->getMembershipID())->getPersonID())->getFirstname());
+ $bootos->setConfigID("[".$bootos->getConfigID()."] ".$configmapper->find($bootos->getConfigID())->getTitle());
+
+ }
+
}
public function createbootosAction()
{
+ $groupmapper = new Application_Model_GroupMapper();
+ $configmapper = new Application_Model_ConfigMapper();
+
if (!isset($_POST["createbootos"])){
- $createbootosForm = new Application_Form_BootosCreate();
+ $createbootosForm = new Application_Form_BootosCreate(array('grouplist' => $groupmapper->fetchAll() ,'configlist'=>$configmapper->fetchAll()));
} else {
$createbootosForm = new Application_Form_BootosCreate($_POST);
@@ -49,6 +66,8 @@ class BootosController extends Zend_Controller_Action
public function editbootosAction()
{
$bootosID = $this->_request->getParam('bootosID');
+ $groupmapper = new Application_Model_GroupMapper();
+ $configmapper = new Application_Model_ConfigMapper();
if (!isset($_POST["editbootos"])){
$bootosID = $this->_request->getParam('bootosID');
@@ -59,7 +78,7 @@ class BootosController extends Zend_Controller_Action
$bootosmapper = new Application_Model_BootOsMapper();
$bootos = $bootosmapper->find($bootosID);
- $editbootosForm = new Application_Form_BootosEdit();
+ $editbootosForm = new Application_Form_BootosEdit(array('grouplist' => $groupmapper->fetchAll() ,'configlist'=>$configmapper->fetchAll()));
$editbootosForm->populate($bootos->toArray());
}
}else{