/** * rootnavigationAction * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function rootnavigationAction() { $this->core->logger->debug('contacts->controllers->NavigationController->rootnavigationAction()'); $objRequest = $this->getRequest(); $intCurrLevel = $objRequest->getParam('currLevel'); $this->setRootLevelId($objRequest->getParam('rootLevelId')); $intRootLevelTypeId = $objRequest->getParam('rootLevelTypeId'); $intRootLevelGroupId = $objRequest->getParam('rootLevelGroupId'); $strRootLevelGroupKey = $objRequest->getParam('rootLevelGroupKey'); $strRenderScript = ''; if (Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->intRootLevelId, Security::PRIVILEGE_VIEW, true, false)) { $objRootelements = new stdClass(); if ($intRootLevelTypeId != '' && $intRootLevelTypeId > 0) { switch ($intRootLevelTypeId) { case $this->core->sysConfig->root_level_types->contacts: /** * get contacts root navigation */ $this->getModelContacts(); $objRootelements = $this->objModelContacts->loadNavigation($this->intRootLevelId, 0); $strRenderScript = 'contactnavigation.phtml'; break; case $this->core->sysConfig->root_level_types->locations: /** * get locations root navigation */ $this->getModelLocations(); $objRootelements = $this->objModelLocations->loadNavigation($this->intRootLevelId, 0, true); $strRenderScript = 'locationnavigation.phtml'; break; case $this->core->sysConfig->root_level_types->members: /** * get members root navigation */ $this->getModelMembers(); $objRootelements = $this->objModelMembers->loadNavigation($this->intRootLevelId, 0); $strRenderScript = 'membernavigation.phtml'; break; } } $this->view->assign('rootelements', $objRootelements); $this->view->assign('currLevel', $intCurrLevel); $this->view->assign('rootLevelId', $this->intRootLevelId); $this->view->assign('rootLevelTypeId', $intRootLevelTypeId); $this->view->assign('unitFormDefaultId', $this->core->sysConfig->form->ids->units->default); $this->view->assign('contactFormDefaultId', $this->core->sysConfig->form->ids->contacts->default); $this->view->assign('return', true); if ($strRenderScript != '') { $this->renderScript('navigation/' . $strRenderScript); } } else { $this->view->assign('return', false); } }