TYPO3 CMS  TYPO3_7-6
PageInformationController.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
20 
25 {
31  public function modMenu()
32  {
33  return [
34  'pages' => [
35  0 => $GLOBALS['LANG']->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:pages_0'),
36  2 => $GLOBALS['LANG']->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:pages_2'),
37  1 => $GLOBALS['LANG']->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:pages_1')
38  ],
39  'depth' => [
40  0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'),
41  1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'),
42  2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'),
43  3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'),
44  4 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_4'),
45  999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')
46  ]
47  ];
48  }
49 
55  public function main()
56  {
57  $theOutput = $this->pObj->doc->header($this->getLanguageService()->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_webinfo.xlf:page_title'));
58  $dblist = GeneralUtility::makeInstance(PageLayoutView::class);
59  $dblist->descrTable = '_MOD_web_info';
60  $dblist->thumbs = 0;
61  $dblist->script = BackendUtility::getModuleUrl('web_info');
62  $dblist->showIcon = 0;
63  $dblist->setLMargin = 0;
64  $dblist->agePrefixes = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears');
65  $dblist->pI_showUser = 1;
66  // PAGES:
67  $this->pObj->MOD_SETTINGS['pages_levels'] = $this->pObj->MOD_SETTINGS['depth'];
68  // ONLY for the sake of dblist module which uses this value.
69  $h_func = BackendUtility::getDropdownMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth']);
70  $h_func .= BackendUtility::getDropdownMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages']);
71  $dblist->start($this->pObj->id, 'pages', 0);
72  $dblist->generateList();
73  // CSH
74  $theOutput .= '<div>';
75  $theOutput .= BackendUtility::cshItem($dblist->descrTable, 'pagetree_overview', null, '<span class="btn btn-default btn-sm">|</span><br />')
76  . '<div class="form-inline form-inline-spaced">'
77  . $h_func
78  . '</div>'
79  . $dblist->HTMLcode;
80  $theOutput .= '</div>';
81  // Additional footer content
82  $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'];
83  if (is_array($footerContentHook)) {
84  foreach ($footerContentHook as $hook) {
85  $params = [];
86  $theOutput .= GeneralUtility::callUserFunction($hook, $params, $this);
87  }
88  }
89  return $theOutput;
90  }
91 }
static callUserFunction($funcName, &$params, &$ref, $checkPrefix='', $errorMode=0)
static cshItem($table, $field, $_='', $wrap='')
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']
static getDropdownMenu($mainParams, $elementName, $currentValue, $menuItems, $script='', $addParams='')