コード例 #1
0
ファイル: BackendController.php プロジェクト: hlop/TYPO3.CMS
 /**
  * loads all modules from the repository
  * and renders it with a template
  *
  * @return string
  */
 protected function generateModuleMenu()
 {
     // get all modules except the user modules for the side menu
     $moduleStorage = $this->backendModuleRepository->loadAllowedModules(array('user', 'help'));
     $view = $this->getFluidTemplateObject($this->templatePath . 'ModuleMenu/Main.html');
     $view->assign('modules', $moduleStorage);
     return $view->render();
 }
コード例 #2
0
 /**
  * Creates the "third level" menu entries (submodules for the info module for
  * example) from the TBE_MODULES_EXT array
  *
  * @return void
  */
 protected function createMenuEntriesForTbeModulesExt()
 {
     foreach ($GLOBALS['TBE_MODULES_EXT'] as $mainModule => $tbeModuleExt) {
         list($main) = explode('_', $mainModule);
         $mainEntry = $this->moduleMenuRepository->findByModuleName($main);
         if ($mainEntry !== FALSE) {
             $subEntries = $mainEntry->getChildren();
             if (!empty($subEntries)) {
                 $matchingSubEntry = $this->moduleMenuRepository->findByModuleName($mainModule);
                 if ($matchingSubEntry !== FALSE) {
                     if (array_key_exists('MOD_MENU', $tbeModuleExt) && array_key_exists('function', $tbeModuleExt['MOD_MENU'])) {
                         foreach ($tbeModuleExt['MOD_MENU']['function'] as $subModule) {
                             $entry = $this->createEntryFromRawData($subModule);
                             $matchingSubEntry->addChild($entry);
                         }
                     }
                 }
             }
         }
     }
 }