/** * Render template menu * * @return string */ public function templateMenu() { $this->templateService = GeneralUtility::makeInstance(ExtendedTemplateService::class); $this->templateService->init(); $all = $this->templateService->ext_getAllTemplates($this->id); if (count($all) > 1) { $this->MOD_MENU['templatesOnPage'] = []; foreach ($all as $d) { $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title']; } } $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList); return BackendUtility::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']); }