From 6af55d49f3984d086872860832d0d296a2591647 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Thu, 10 Mar 2011 16:40:22 +0100 Subject: Bootmenu auf preboot JSON --- application/controllers/BootmenuController.php | 32 ++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'application/controllers') diff --git a/application/controllers/BootmenuController.php b/application/controllers/BootmenuController.php index 8cda756..9a212d6 100644 --- a/application/controllers/BootmenuController.php +++ b/application/controllers/BootmenuController.php @@ -66,27 +66,25 @@ class BootmenuController extends Zend_Controller_Action }else{ $bootmenu = new Application_Model_BootMenu(); $bootmenumapper->find($bootmenuID, $bootmenu); + + $cc['title'] = $bootmenu->getTitle(); $bootmenuentries = array(); - $bootmenuentries[$bootmenuID] = $bootmenuentriesmapper->findBy('bootmenuID',$bootmenuID); - $bootmenu->setGroupID("[".$bootmenu->getGroupID()."] ".$groupmapper->find($bootmenu->getGroupID())->getTitle()); - $bootmenu->setMembershipID("[".$bootmenu->getMembershipID()."] ".$personmapper->find($membershipmapper->find($bootmenu->getMembershipID())->getPersonID())->getFirstname()); - - $this->view->bootmenulist = array($bootmenu); - + $bootmenuentries = $bootmenuentriesmapper->findBy('bootmenuID',$bootmenuID); + + foreach($bootmenuentries as $bootmenuentry){ + $ar = array(); + $ar['title'] = $bootmenu->getTitle(); + $ar['id'] = $bootmenu->getID(); + $cc['data'][] = $ar; + } + + echo json_encode($cc); + + // print_a($cc); + } - $this->view->bootmenuentrylist = $bootmenuentries; - - - echo json_encode( - array( - 'bootosmapper' => $this->view->bootosmapper, - 'configmapper' => $this->view->configmapper, - 'bootmenulist' => $this->view->bootmenulist, - 'bootmenuentrylist' => $this->view->bootmenuentrylist - ) - ); } } -- cgit v1.2.3-55-g7522