2 namespace TYPO3\CMS\Info\Controller;
75 $this->languageService =
$GLOBALS[
'LANG'];
76 $this->languageService->includeLLFile(
'EXT:lang/locallang_mod_web_info.xlf');
78 $this->backendUser =
$GLOBALS[
'BE_USER'];
81 'name' => $this->moduleName,
98 if ($this->pageinfo) {
99 $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
101 $access = is_array($this->pageinfo);
102 if ($this->
id && $access || $this->backendUser->user[
'admin'] && !$this->id) {
103 if ($this->backendUser->user[
'admin'] && !$this->id) {
104 $this->pageinfo = array(
'title' =>
'[root-level]',
'uid' => 0,
'pid' => 0);
107 $this->moduleTemplate->addJavaScriptCode(
109 'if (top.fsMod) top.fsMod.recentIds["web"] = ' . (
int)$this->
id .
';
110 function jumpToUrl(URL) {
111 window.location.href = URL;
117 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule(
'TYPO3/CMS/Backend/ClickMenu');
118 $this->content .=
'<form action="' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName)) .
119 '" method="post" id="InfoModuleController" name="webinfoForm" class="form-inline form-inline-spaced">';
120 $vContent = $this->moduleTemplate->getVersionSelector($this->
id, 1);
122 $this->content .=
'<div>' . $vContent .
'</div>';
128 $this->content .=
'</form>';
131 $this->content = $this->doc->header($this->languageService->getLL(
'title'));
144 $this->content = $this->doc->insertStylesAndJS($this->content);
168 $this->moduleTemplate->setContent($this->content);
169 $response->
getBody()->write($this->moduleTemplate->renderContent());
178 $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
180 $cshButton = $buttonBar->makeHelpButton()
181 ->setModuleName(
'_MOD_web_info')
185 $viewButton = $buttonBar->makeLinkButton()
188 $this->pageinfo[
'uid'],
192 ->setTitle($this->languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.showPage',
true))
193 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
'actions-document-view',
Icon::SIZE_SMALL));
196 $shortCutButton = $buttonBar->makeShortcutButton()
197 ->setModuleName($this->moduleName)
198 ->setDisplayName($this->MOD_MENU[
'function'][$this->MOD_SETTINGS[
'function']])
209 ->setSetVariables(array_keys($this->MOD_MENU));
218 $menu = $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
219 $menu->setIdentifier(
'WebInfoJumpMenu');
220 foreach ($this->MOD_MENU[
'function'] as $controller => $title) {
224 BackendUtility::getModuleUrl(
229 'function' => $controller
235 if ($controller === $this->MOD_SETTINGS[
'function']) {
236 $item->setActive(
true);
238 $menu->addMenuItem($item);
240 $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);