17 use Psr\Http\Message\ServerRequestInterface;
42 'pObj' =>
'Using PageInformationController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
43 'function_key' =>
'Using PageInformationController::$function_key is deprecated, property will be removed in TYPO3 v10.0.',
44 'extClassConf' =>
'Using PageInformationController::$extClassConf is deprecated, property will be removed in TYPO3 v10.0.',
45 'localLangFile' =>
'Using PageInformationController::$localLangFile is deprecated, property will be removed in TYPO3 v10.0.',
46 'extObj' =>
'Using PageInformationController::$extObj is deprecated, property will be removed in TYPO3 v10.0.',
53 'modMenu' =>
'Using PageInformationController::modMenu() is deprecated and will not be possible anymore in TYPO3 v10.0.',
54 'extObjContent' =>
'Using PageInformationController::extObjContent() is deprecated, method will be removed in TYPO3 v10.0.',
104 if (!empty($this->localLangFile)) {
108 $this->
id = (int)GeneralUtility::_GP(
'id');
110 $this->pObj->MOD_MENU = array_merge($this->pObj->MOD_MENU, $this->modMenu());
118 public function main()
121 $theOutput =
'<h1>' . htmlspecialchars($languageService->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:page_title')) .
'</h1>';
122 $dblist = GeneralUtility::makeInstance(PageLayoutView::class);
123 $dblist->descrTable =
'_MOD_web_info';
126 $uriBuilder = GeneralUtility::makeInstance(\
TYPO3\CMS\Backend\Routing\UriBuilder::class);
127 $dblist->script = (string)$uriBuilder->buildUriFromRoute(
'web_info');
128 $dblist->showIcon = 0;
129 $dblist->setLMargin = 0;
130 $dblist->agePrefixes =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.minutesHoursDaysYears');
131 $dblist->pI_showUser =
true;
133 if (isset($this->fieldConfiguration[$this->pObj->MOD_SETTINGS[
'pages']])) {
134 $dblist->fieldArray = $this->fieldConfiguration[$this->pObj->MOD_SETTINGS[
'pages']][
'fields'];
138 $this->pObj->MOD_SETTINGS[
'pages_levels'] = $this->pObj->MOD_SETTINGS[
'depth'];
142 $dblist->start($this->
id,
'pages', 0);
143 $dblist->generateList();
145 $theOutput .=
'<div class="form-inline form-inline-spaced">'
147 .
'<div class="form-group">'
148 .
BackendUtility::cshItem($dblist->descrTable,
'func_' . $this->pObj->MOD_SETTINGS[
'pages'],
null,
'<span class="btn btn-default btn-sm">|</span>')
154 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'cms/web_info/class.tx_cms_webinfo.php'][
'drawFooterHook'] ?? [] as $hook) {
157 $theOutput .= GeneralUtility::callUserFunction($hook, $params, $this);
172 0 =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_0'),
173 1 =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_1'),
174 2 =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_2'),
175 3 =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_3'),
176 4 =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_4'),
177 999 =>
$GLOBALS[
'LANG']->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_infi')
184 foreach ($this->fieldConfiguration as $key => $item) {
185 $menu[
'pages'][$key] = $item[
'label'];
200 $tableNames = array_flip(array_keys(
$GLOBALS[
'TCA']));
202 unset($tableNames[
'pages']);
203 unset($tableNames[
'sys_filemounts']);
204 unset($tableNames[
'sys_action']);
205 unset($tableNames[
'sys_workflows']);
206 unset($tableNames[
'be_users']);
207 unset($tableNames[
'be_groups']);
208 $allowedTableNames = [];
210 if (is_array($tableNames)) {
211 foreach ($tableNames as $k => $v) {
213 $allowedTableNames[
'table_' . $k] = $k;
217 return implode(
',', array_keys($allowedTableNames));
229 foreach ($modTSconfig as $key => $item) {
230 $fieldList = str_replace(
'###ALL_TABLES###', $this->
cleanTableNames(), $item[
'fields']);
231 $fields = GeneralUtility::trimExplode(
',', $fieldList,
true);
232 if ((
int)$key === 0) {
235 $site = $request->getAttribute(
'site');
238 } elseif ($site instanceof
Site && !$site instanceof
NullSite) {
242 $key = trim($key,
'.');
243 $this->fieldConfiguration[$key] = [
244 'label' => $item[
'label'] ?
$GLOBALS[
'LANG']->sL($item[
'label']) : $key,
257 if (is_array($this->extClassConf) && $this->extClassConf[
'name']) {
258 $this->extObj = GeneralUtility::makeInstance($this->extClassConf[
'name']);
259 $this->extObj->init($this->pObj, $this->extClassConf);
272 if (is_object($this->extObj)) {
273 return $this->extObj->main();