first commit

This commit is contained in:
salam committed 2026-10-19 08:18:39 +02:00
commit 1218dd1517
12716 files changed
+989233

No files matched your search

@@ -0,0 +1,594 @@
<?php
namespace TYPO3\CMS\Info\Controller;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
use TYPO3\CMS\Backend\Template\DocumentTemplate;
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageService;
use TYPO3\CMS\Core\Type\Bitmask\Permission;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
/**
* Script Class for the Web > Info module
* This class creates the framework to which other extensions can connect their sub-modules
* @internal This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.
*/
class InfoModuleController
{
use PublicPropertyDeprecationTrait;
use PublicMethodDeprecationTrait;
/**
* @var array
*/
private $deprecatedPublicProperties = [
'perms_clause' => 'Using InfoModuleController::$perms_clause is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modTSconfig' => 'Using InfoModuleController::$modTSconfig is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu_setDefaultList' => 'Using InfoModuleController::$modMenu_setDefaultList is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu_dontValidateList' => 'Using InfoModuleController::$modMenu_dontValidateList is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu_type' => 'Using InfoModuleController::$modMenu_type$ is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extClassConf' => 'Using InfoModuleController::extClassConf$ is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extObj' => 'Using InfoModuleController::$extObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
'content' => 'Using InfoModuleController::$content is deprecated and will not be possible anymore in TYPO3 v10.0.',
'pObj' => 'Using InfoModuleController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
'id' => 'Using InfoModuleController::id$ is deprecated and will not be possible anymore in TYPO3 v10.0.',
'CMD' => 'Using InfoModuleController::$CMD is deprecated, property will be removed in TYPO3 v10.0.',
'doc' => 'Using InfoModuleController::$doc is deprecated, property will be removed in TYPO3 v10.0.',
'MCONF' => 'Using InfoModuleController::$MCONF is deprecated, property will be removed in TYPO3 v10.0.',
];
/**
* @var array
*/
private $deprecatedPublicMethods = [
'main' => 'Using InfoModuleController::main() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'init' => 'Using InfoModuleController::init() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'getModuleTemplate' => 'Using InfoModuleController::getModuleTemplate() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'menuConfig' => 'Using InfoModuleController::menuConfig() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'handleExternalFunctionValue' => 'Using InfoModuleController::handleExternalFunctionValue() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'mergeExternalItems' => 'Using InfoModuleController::mergeExternalItems() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'getExternalItemConfig' => 'Using InfoModuleController::getExternalItemConfig() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extObjContent' => 'Using InfoModuleController::extObjContent() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'getExtObjContent' => 'Using InfoModuleController::getExtObjContent() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'checkExtObj' => 'Using InfoModuleController::checkExtObj() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extObjHeader' => 'Using InfoModuleController::extObjHeader() is deprecated, method will be removed in TYPO3 v10.0.',
'checkSubExtObj' => 'Using InfoModuleController::checkSubExtObj() is deprecated, method will be removed in TYPO3 v10.0.',
];
/**
* @var array Used by client classes.
*/
public $pageinfo;
/**
* The name of the module
*
* @var string
*/
protected $moduleName = 'web_info';
/**
* ModuleTemplate Container
*
* @var ModuleTemplate
*/
protected $moduleTemplate;
/**
* @var StandaloneView
*/
protected $view;
/**
* Loaded with the global array $MCONF which holds some module configuration from the conf.php file of backend modules.
*
* @var array
*/
protected $MCONF = [];
/**
* @var int Value of the GET/POST var 'id'
*/
protected $id;
/**
* The value of GET/POST var, 'CMD'
*
* @var mixed
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $CMD;
/**
* A WHERE clause for selection records from the pages table based on read-permissions of the current backend user.
*
* @var string
*/
protected $perms_clause;
/**
* The module menu items array. Each key represents a key for which values can range between the items in the array of that key.
* Written by client classes.
*
* @var array
*/
public $MOD_MENU = [
'function' => []
];
/**
* Current settings for the keys of the MOD_MENU array
* Written by client classes.
*
* @var array
*/
public $MOD_SETTINGS = [];
/**
* Module TSconfig based on PAGE TSconfig / USER TSconfig
*
* @var array
*/
protected $modTSconfig;
/**
* If type is 'ses' then the data is stored as session-lasting data. This means that it'll be wiped out the next time the user logs in.
* Can be set from extension classes of this class before the init() function is called.
*
* @var string
*/
protected $modMenu_type = '';
/**
* dontValidateList can be used to list variables that should not be checked if their value is found in the MOD_MENU array. Used for dynamically generated menus.
* Can be set from extension classes of this class before the init() function is called.
*
* @var string
*/
protected $modMenu_dontValidateList = '';
/**
* List of default values from $MOD_MENU to set in the output array (only if the values from MOD_MENU are not arrays)
* Can be set from extension classes of this class before the init() function is called.
*
* @var string
*/
protected $modMenu_setDefaultList = '';
/**
* @var array Contains module configuration parts from TBE_MODULES_EXT if found
*/
protected $extClassConf;
/**
* Generally used for accumulating the output content of backend modules
*
* @var string
*/
protected $content = '';
/**
* @var DocumentTemplate
*/
protected $doc;
/**
* May contain an instance of a 'Function menu module' which connects to this backend module.
*
* @var \object
*/
protected $extObj;
/**
* Constructor
*/
public function __construct()
{
$this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
$languageService = $this->getLanguageService();
$languageService->includeLLFile('EXT:info/Resources/Private/Language/locallang_mod_web_info.xlf');
// @deprecated and will be removed in TYPO3 v10.0.
$this->MCONF = [
'name' => $this->moduleName,
];
}
/**
* Initializes the backend module by setting internal variables, initializing the menu.
*/
protected function init()
{
$this->id = (int)GeneralUtility::_GP('id');
// @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
$this->CMD = GeneralUtility::_GP('CMD');
$this->perms_clause = $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW);
$this->menuConfig();
$this->handleExternalFunctionValue();
}
/**
* Initialize module header etc and call extObjContent function
*/
protected function main()
{
// since TYPO3 v9, will be removed in TYPO3 v10.0.
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$languageService = $this->getLanguageService();
$backendUser = $this->getBackendUser();
// The page will show only if there is a valid page and if this page
// may be viewed by the user
$this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
if ($this->pageinfo) {
$this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
}
$access = is_array($this->pageinfo);
if ($this->id && $access || $backendUser->isAdmin() && !$this->id) {
if ($backendUser->isAdmin() && !$this->id) {
$this->pageinfo = ['title' => '[root-level]', 'uid' => 0, 'pid' => 0];
}
// JavaScript
$this->moduleTemplate->addJavaScriptCode(
'WebFuncInLineJS',
'if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
function jumpToUrl(URL) {
window.location.href = URL;
return false;
}
'
);
// Setting up the context sensitive menu:
$this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');
$this->view = $this->getFluidTemplateObject();
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$this->view->assign('moduleName', (string)$uriBuilder->buildUriFromRoute($this->moduleName));
$this->view->assign('functionMenuModuleContent', $this->getExtObjContent());
// Setting up the buttons and markers for doc header
$this->getButtons();
$this->generateMenu();
$this->content .= $this->view->render();
} else {
// If no access or if ID == zero
$this->content = $this->moduleTemplate->header($languageService->getLL('title'));
}
}
/**
* Injects the request object for the current request or subrequest
* Then checks for module functions that have hooked in, and renders menu etc.
*
* @param ServerRequestInterface $request the current request
* @return ResponseInterface the response with the content
*/
public function mainAction(ServerRequestInterface $request): ResponseInterface
{
// @deprecated and will be removed in TYPO3 v10.0.
$GLOBALS['SOBE'] = $this;
$this->init();
// Checking for first level external objects
$this->checkExtObj();
// Checking second level external objects
// @deprecated and will be removed in TYPO3 v10.0.
$this->checkSubExtObj();
$this->main();
$this->moduleTemplate->setContent($this->content);
return new HtmlResponse($this->moduleTemplate->renderContent());
}
/**
* Create the panel of buttons for submitting the form or otherwise perform operations.
*/
protected function getButtons()
{
$languageService = $this->getLanguageService();
$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
// View page
$viewButton = $buttonBar->makeLinkButton()
->setHref('#')
->setOnClick(BackendUtility::viewOnClick(
$this->pageinfo['uid'],
'',
BackendUtility::BEgetRootLine($this->pageinfo['uid'])
))
->setTitle($languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-view-page', Icon::SIZE_SMALL));
$buttonBar->addButton($viewButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
// Shortcut
$shortCutButton = $buttonBar->makeShortcutButton()
->setModuleName($this->moduleName)
->setDisplayName($this->MOD_MENU['function'][$this->MOD_SETTINGS['function']])
->setGetVariables([
'route',
'id',
'edit_record',
'pointer',
'new_unique_uid',
'search_field',
'search_levels',
'showLimit'
])
->setSetVariables(array_keys($this->MOD_MENU));
$buttonBar->addButton($shortCutButton, ButtonBar::BUTTON_POSITION_RIGHT);
// CSH
$cshButton = $buttonBar->makeHelpButton()
->setModuleName('xMOD_csh_corebe')
->setFieldName('pagetree_overview');
$buttonBar->addButton($cshButton);
}
/**
* Generate the ModuleMenu
*/
protected function generateMenu()
{
$menu = $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
$menu->setIdentifier('WebInfoJumpMenu');
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
foreach ($this->MOD_MENU['function'] as $controller => $title) {
$item = $menu
->makeMenuItem()
->setHref(
(string)$uriBuilder->buildUriFromRoute(
$this->moduleName,
[
'id' => $this->id,
'SET' => [
'function' => $controller
]
]
)
)
->setTitle($title);
if ($controller === $this->MOD_SETTINGS['function']) {
$item->setActive(true);
}
$menu->addMenuItem($item);
}
$this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);
}
/**
* Returns the ModuleTemplate container
* This is used by PageLayoutView.php
*
* @return ModuleTemplate
*/
protected function getModuleTemplate()
{
return $this->moduleTemplate;
}
/**
* returns a new standalone view, shorthand function
*
* @return StandaloneView
*/
protected function getFluidTemplateObject()
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setLayoutRootPaths([GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Layouts')]);
$view->setPartialRootPaths([GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Partials')]);
$view->setTemplateRootPaths([GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Templates')]);
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Templates/Main.html'));
$view->getRequest()->setControllerExtensionName('info');
return $view;
}
/**
* Initializes the internal MOD_MENU array setting and unsetting items based on various conditions. It also merges in external menu items from the global array TBE_MODULES_EXT (see mergeExternalItems())
* Then MOD_SETTINGS array is cleaned up (see \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData()) so it contains only valid values. It's also updated with any SET[] values submitted.
* Also loads the modTSconfig internal variable.
*/
protected function menuConfig()
{
// Page / user TSconfig settings and blinding of menu-items
$this->modTSconfig['properties'] = BackendUtility::getPagesTSconfig($this->id)['mod.']['web_info.'] ?? [];
$this->MOD_MENU['function'] = $this->mergeExternalItems('web_info', 'function', $this->MOD_MENU['function']);
$blindActions = $this->modTSconfig['properties']['menu.']['function.'] ?? [];
foreach ($blindActions as $key => $value) {
if (!$value && array_key_exists($key, $this->MOD_MENU['function'])) {
unset($this->MOD_MENU['function'][$key]);
}
}
$this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), 'web_info', $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
}
/**
* Merges menu items from global array $TBE_MODULES_EXT
*
* @param string $modName Module name for which to find value
* @param string $menuKey Menu key, eg. 'function' for the function menu.
* @param array $menuArr The part of a MOD_MENU array to work on.
* @return array Modified array part.
* @internal
*/
protected function mergeExternalItems($modName, $menuKey, $menuArr)
{
$mergeArray = $GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey];
if (is_array($mergeArray)) {
$backendUser = $this->getBackendUser();
foreach ($mergeArray as $k => $v) {
if (((string)$v['ws'] === '' || $backendUser->workspace === 0 && GeneralUtility::inList($v['ws'], 'online'))
|| $backendUser->workspace === -1 && GeneralUtility::inList($v['ws'], 'offline')
|| $backendUser->workspace > 0 && GeneralUtility::inList($v['ws'], 'custom')
) {
$menuArr[$k] = $this->getLanguageService()->sL($v['title']);
}
}
}
return $menuArr;
}
/**
* Loads $this->extClassConf with the configuration for the CURRENT function of the menu.
*
* @param string $MM_key The key to MOD_MENU for which to fetch configuration. 'function' is default since it is first and foremost used to get information per "extension object" (I think that is what its called)
* @param string $MS_value The value-key to fetch from the config array. If NULL (default) MOD_SETTINGS[$MM_key] will be used. This is useful if you want to force another function than the one defined in MOD_SETTINGS[function]. Call this in init() function of your Script Class: handleExternalFunctionValue('function', $forcedSubModKey)
*/
protected function handleExternalFunctionValue($MM_key = 'function', $MS_value = null)
{
if ($MS_value === null) {
$MS_value = $this->MOD_SETTINGS[$MM_key];
}
$this->extClassConf = $this->getExternalItemConfig('web_info', $MM_key, $MS_value);
}
/**
* Returns configuration values from the global variable $TBE_MODULES_EXT for the module given.
* For example if the module is named "web_info" and the "function" key ($menuKey) of MOD_SETTINGS is "stat" ($value) then you will have the values
* of $TBE_MODULES_EXT['webinfo']['MOD_MENU']['function']['stat'] returned.
*
* @param string $modName Module name
* @param string $menuKey Menu key, eg. "function" for the function menu. See $this->MOD_MENU
* @param string $value Optionally the value-key to fetch from the array that would otherwise have been returned if this value was not set. Look source...
* @return mixed The value from the TBE_MODULES_EXT array.
*/
protected function getExternalItemConfig($modName, $menuKey, $value = '')
{
if (isset($GLOBALS['TBE_MODULES_EXT'][$modName])) {
return (string)$value !== ''
? $GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey][$value]
: $GLOBALS['TBE_MODULES_EXT'][$modName]['MOD_MENU'][$menuKey];
}
return null;
}
/**
* Creates an instance of the class found in $this->extClassConf['name'] in $this->extObj if any (this should hold three keys, "name", "path" and "title" if a "Function menu module" tries to connect...)
* This value in extClassConf might be set by an extension (in an ext_tables/ext_localconf file) which thus "connects" to a module.
* The array $this->extClassConf is set in handleExternalFunctionValue() based on the value of MOD_SETTINGS[function]
* If an instance is created it is initiated with $this passed as value and $this->extClassConf as second argument. Further the $this->MOD_SETTING is cleaned up again after calling the init function.
*/
protected function checkExtObj()
{
if (is_array($this->extClassConf) && $this->extClassConf['name']) {
$this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);
if (is_callable([$this->extObj, 'init'])) {
$this->extObj->init($this);
}
// Re-write:
$this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), 'web_info', $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
}
}
/**
* Calls the checkExtObj function in sub module if present.
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected function checkSubExtObj()
{
if (is_object($this->extObj) && is_callable([$this->extObj, 'checkExtObj'])) {
$this->extObj->checkExtObj();
}
}
/**
* Calls the 'header' function inside the "Function menu module" if present.
* A header function might be needed to add JavaScript or other stuff in the head. This can't be done in the main function because the head is already written.
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected function extObjHeader()
{
if (is_callable([$this->extObj, 'head'])) {
$this->extObj->head();
}
}
/**
* Calls the 'main' function inside the "Function menu module" if present
*/
protected function extObjContent()
{
if ($this->extObj === null) {
$languageService = $this->getLanguageService();
$flashMessage = GeneralUtility::makeInstance(
FlashMessage::class,
$languageService->sL('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:no_modules_registered'),
$languageService->getLL('title'),
FlashMessage::ERROR
);
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
/** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue $defaultFlashMessageQueue */
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage);
} else {
if (is_callable([$this->extObj, 'main'])) {
$main = $this->extObj->main();
if ($main instanceof ResponseInterface) {
$stream = $main->getBody();
$stream->rewind();
$main = $stream->getContents();
}
$this->content .= $main;
}
}
}
/**
* Return the content of the 'main' function inside the "Function menu module" if present
*
* @return string
*/
protected function getExtObjContent()
{
$savedContent = $this->content;
$this->content = '';
$this->extObjContent();
$newContent = $this->content;
$this->content = $savedContent;
return $newContent;
}
/**
* @return LanguageService
*/
protected function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
/**
* @return BackendUserAuthentication
*/
protected function getBackendUser(): BackendUserAuthentication
{
return $GLOBALS['BE_USER'];
}
}
@@ -0,0 +1,485 @@
<?php
namespace TYPO3\CMS\Info\Controller;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\TypoScript\ExtendedTemplateService;
use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
/**
* Page TSconfig viewer in Web -> Info
* @internal This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.
*/
class InfoPageTyposcriptConfigController
{
use PublicPropertyDeprecationTrait;
use PublicMethodDeprecationTrait;
/**
* @var array
*/
private $deprecatedPublicProperties = [
'pObj' => 'Using InfoPageTyposcriptConfigController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
'function_key' => 'Using InfoPageTyposcriptConfigController::$function_key is deprecated, property will be removed in TYPO3 v10.0.',
'extClassConf' => 'Using InfoPageTyposcriptConfigController::$extClassConf is deprecated, property will be removed in TYPO3 v10.0.',
'localLangFile' => 'Using InfoPageTyposcriptConfigController::$localLangFile is deprecated, property will be removed in TYPO3 v10.0.',
'extObj' => 'Using InfoPageTyposcriptConfigController::$extObj is deprecated, property will be removed in TYPO3 v10.0.',
];
/**
* @var array
*/
private $deprecatedPublicMethods = [
'modMenu' => 'Using InfoPageTyposcriptConfigController::modMenu() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extObjContent' => 'Using InfoPageTyposcriptConfigController::extObjContent() is deprecated, method will be removed in TYPO3 v10.0.',
];
/**
* @var IconFactory
*/
protected $iconFactory;
/**
* @var StandaloneView
*/
protected $view;
/**
* @var InfoModuleController Contains a reference to the parent calling object
*/
protected $pObj;
/**
* @var int Value of the GET/POST var 'id'
*/
protected $id;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $extObj;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $localLangFile = '';
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $extClassConf;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $function_key = '';
/**
* Init, called from parent object
*
* @param InfoModuleController $pObj A reference to the parent (calling) object
*/
public function init($pObj)
{
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$languageService = $this->getLanguageService();
$languageService->includeLLFile('EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf');
$this->view = $this->getFluidTemplateObject();
$this->pObj = $pObj;
// Local lang:
if (!empty($this->localLangFile)) {
// @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
$languageService->includeLLFile($this->localLangFile);
}
$this->id = (int)GeneralUtility::_GP('id');
// Setting MOD_MENU items as we need them for logging:
$this->pObj->MOD_MENU = array_merge($this->pObj->MOD_MENU, $this->modMenu());
}
/**
* Main, called from parent object
*
* @return string HTML output
*/
public function main()
{
$pageId = (int)GeneralUtility::_GP('id');
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
if ($pageId === 0) {
$this->view->assign('pageZero', 1);
$pagesUsingTSConfig = $this->getOverviewOfPagesUsingTSConfig();
if (count($pagesUsingTSConfig) > 0) {
$this->view->assign('overviewOfPagesUsingTSConfig', $pagesUsingTSConfig);
}
} else {
if ($this->pObj->MOD_SETTINGS['tsconf_parts'] == 99) {
$TSparts = BackendUtility::getRawPagesTSconfig($this->id);
$lines = [];
$pUids = [];
foreach ($TSparts as $k => $v) {
if ($k !== 'uid_0') {
$line = [];
if ($k === 'defaultPageTSconfig') {
$line['defaultPageTSconfig'] = 1;
} else {
$editIdList = substr($k, 4);
$pUids[] = $editIdList;
$row = BackendUtility::getRecordWSOL('pages', $editIdList);
$icon = $this->iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL);
$urlParameters = [
'edit' => [
'pages' => [
$editIdList => 'edit',
]
],
'columnsOnly' => 'TSconfig',
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
];
$line['editIcon'] = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
$line['editTitle'] = 'editTSconfig';
$line['title'] = BackendUtility::wrapClickMenuOnIcon($icon, 'pages', $row['uid'])
. ' ' . htmlspecialchars(BackendUtility::getRecordTitle('pages', $row));
}
$tsparser = GeneralUtility::makeInstance(TypoScriptParser::class);
$tsparser->lineNumberOffset = 0;
$line['content'] = $tsparser->doSyntaxHighlight(trim($v) . LF);
$lines[] = $line;
}
}
if (!empty($pUids)) {
$urlParameters = [
'edit' => [
'pages' => [
implode(',', $pUids) => 'edit',
]
],
'columnsOnly' => 'TSconfig',
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
];
$url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
$editIcon = htmlspecialchars($url);
$editTitle = 'editTSconfig_all';
} else {
$editIcon = '';
$editTitle = '';
}
$this->view->assign('tsconfParts99', 1);
$this->view->assign('csh', BackendUtility::cshItem('_MOD_web_info', 'tsconfig_edit', null, '|'));
$this->view->assign('lines', $lines);
$this->view->assign('editIcon', $editIcon);
$this->view->assign('editTitle', $editTitle);
} else {
$this->view->assign('tsconfParts99', 0);
// Defined global here!
$tmpl = GeneralUtility::makeInstance(ExtendedTemplateService::class);
$tmpl->ext_expandAllNotes = 1;
$tmpl->ext_noPMicons = 1;
$pageTsConfig = BackendUtility::getPagesTSconfig($this->id);
switch ($this->pObj->MOD_SETTINGS['tsconf_parts']) {
case '1':
$pageTsConfig = $pageTsConfig['mod.'] ?? [];
break;
case '1a':
$pageTsConfig = $pageTsConfig['mod.']['web_layout.'] ?? [];
break;
case '1b':
$pageTsConfig = $pageTsConfig['mod.']['web_view.'] ?? [];
break;
case '1c':
$pageTsConfig = $pageTsConfig['mod.']['web_modules.'] ?? [];
break;
case '1d':
$pageTsConfig = $pageTsConfig['mod.']['web_list.'] ?? [];
break;
case '1e':
$pageTsConfig = $pageTsConfig['mod.']['web_info.'] ?? [];
break;
case '1f':
$pageTsConfig = $pageTsConfig['mod.']['web_func.'] ?? [];
break;
case '1g':
$pageTsConfig = $pageTsConfig['mod.']['web_ts.'] ?? [];
break;
case '2':
$pageTsConfig = $pageTsConfig['RTE.'] ?? [];
break;
case '5':
$pageTsConfig = $pageTsConfig['TCEFORM.'] ?? [];
break;
case '6':
$pageTsConfig = $pageTsConfig['TCEMAIN.'] ?? [];
break;
case '3':
$pageTsConfig = $pageTsConfig['TSFE.'] ?? [];
break;
case '7':
$pageTsConfig = $pageTsConfig['TCAdefaults.'] ?? [];
break;
case '4':
$pageTsConfig = $pageTsConfig['user.'] ?? [];
break;
default:
// Entire array
}
$this->view->assign('csh', BackendUtility::cshItem('_MOD_web_info', 'tsconfig_hierarchy', null, '|'));
$this->view->assign('tree', $tmpl->ext_getObjTree($pageTsConfig, '', '', '', '', $this->pObj->MOD_SETTINGS['tsconf_alphaSort']));
}
$this->view->assign('alphaSort', BackendUtility::getFuncCheck($this->id, 'SET[tsconf_alphaSort]', $this->pObj->MOD_SETTINGS['tsconf_alphaSort'], '', '', 'id="checkTsconf_alphaSort"'));
$this->view->assign('dropdownMenu', BackendUtility::getDropdownMenu($this->id, 'SET[tsconf_parts]', $this->pObj->MOD_SETTINGS['tsconf_parts'], $this->pObj->MOD_MENU['tsconf_parts']));
}
return $this->view->render();
}
/**
* Function menu initialization
*
* @return array Menu array
*/
protected function modMenu()
{
$lang = $this->getLanguageService();
$modMenuAdd = [
'tsconf_parts' => [
0 => $lang->getLL('tsconf_parts_0'),
1 => $lang->getLL('tsconf_parts_1'),
'1a' => $lang->getLL('tsconf_parts_1a'),
'1b' => $lang->getLL('tsconf_parts_1b'),
'1c' => $lang->getLL('tsconf_parts_1c'),
'1d' => $lang->getLL('tsconf_parts_1d'),
'1e' => $lang->getLL('tsconf_parts_1e'),
'1f' => $lang->getLL('tsconf_parts_1f'),
'1g' => $lang->getLL('tsconf_parts_1g'),
2 => 'RTE.',
7 => 'TCAdefaults.',
5 => 'TCEFORM.',
6 => 'TCEMAIN.',
3 => 'TSFE.',
4 => 'user.',
99 => $lang->getLL('tsconf_configFields')
],
'tsconf_alphaSort' => '1'
];
if (!$this->getBackendUser()->isAdmin()) {
unset($modMenuAdd['tsconf_parts'][99]);
}
return $modMenuAdd;
}
/**
* Renders table rows of all pages containing TSConfig together with its rootline
*
* @return array
*/
protected function getOverviewOfPagesUsingTSConfig()
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
$queryBuilder->getRestrictions()
->removeAll()
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
$res = $queryBuilder
->select('uid', 'TSconfig')
->from('pages')
->where(
$queryBuilder->expr()->neq(
'TSconfig',
$queryBuilder->createNamedParameter('', \PDO::PARAM_STR)
)
)
->execute();
$pageArray = [];
while ($row = $res->fetch()) {
$this->setInPageArray($pageArray, BackendUtility::BEgetRootLine($row['uid'], 'AND 1=1'), $row);
}
return $this->getList($pageArray);
}
/**
* Set page in array
* This function is called recursively and builds a multi-dimensional array that reflects the page
* hierarchy.
*
* @param array $hierarchicArray The hierarchic array (passed by reference)
* @param array $rootlineArray The rootline array
* @param array $row The row from the database containing the uid and TSConfig fields
*/
protected function setInPageArray(&$hierarchicArray, $rootlineArray, $row)
{
ksort($rootlineArray);
reset($rootlineArray);
if (!$rootlineArray[0]['uid']) {
array_shift($rootlineArray);
}
$currentElement = current($rootlineArray);
$hierarchicArray[$currentElement['uid']] = htmlspecialchars($currentElement['title']);
array_shift($rootlineArray);
if (!empty($rootlineArray)) {
if (!isset($hierarchicArray[$currentElement['uid'] . '.'])) {
$hierarchicArray[$currentElement['uid'] . '.'] = [];
}
$this->setInPageArray($hierarchicArray[$currentElement['uid'] . '.'], $rootlineArray, $row);
} else {
$hierarchicArray[$currentElement['uid'] . '_'] = $this->extractLinesFromTSConfig($row);
}
}
/**
* Extract the lines of TSConfig from a given pages row
*
* @param array $row The row from the database containing the uid and TSConfig fields
* @return array
*/
protected function extractLinesFromTSConfig(array $row)
{
$out = [];
$includeLines = 0;
$out['uid'] = $row['uid'];
$lines = GeneralUtility::trimExplode("\r\n", $row['TSconfig']);
foreach ($lines as $line) {
if (strpos($line, '<INCLUDE_TYPOSCRIPT:') !== false) {
$includeLines++;
}
}
$out['includeLines'] = $includeLines;
$out['writtenLines'] = (count($lines) - $includeLines);
return $out;
}
/**
* Get the list of pages to show.
* This function is called recursively
*
* @param array $pageArray The Page Array
* @param array $lines Lines that have been processed up to this point
* @param int $pageDepth The level of the current $pageArray being processed
* @return array
*/
protected function getList($pageArray, $lines = [], $pageDepth = 0)
{
if (!is_array($pageArray)) {
return $lines;
}
foreach ($pageArray as $identifier => $_) {
if (!MathUtility::canBeInterpretedAsInteger($identifier)) {
continue;
}
$line = [];
$line['padding'] = ($pageDepth * 20) + 10;
if (isset($pageArray[$identifier . '_'])) {
$line['link'] = GeneralUtility::linkThisScript(['id' => $identifier]);
$line['icon'] = $this->iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $identifier), Icon::SIZE_SMALL)->render();
$line['title'] = 'ID: ' . $identifier;
$line['pageTitle'] = GeneralUtility::fixed_lgd_cs($pageArray[$identifier], 30);
$line['includedFiles'] = ($pageArray[$identifier . '_']['includeLines'] === 0 ? '' : $pageArray[$identifier . '_']['includeLines']);
$line['lines'] = ($pageArray[$identifier . '_']['writtenLines'] === 0 ? '' : $pageArray[$identifier . '_']['writtenLines']);
} else {
$line['link'] = '';
$line['icon'] = $this->iconFactory->getIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $identifier), Icon::SIZE_SMALL)->render();
$line['title'] = '';
$line['pageTitle'] = GeneralUtility::fixed_lgd_cs($pageArray[$identifier], 30);
$line['includedFiles'] = '';
$line['lines'] = '';
}
$lines[] = $line;
$lines = $this->getList($pageArray[$identifier . '.'], $lines, $pageDepth + 1);
}
return $lines;
}
/**
* returns a new standalone view, shorthand function
*
* @return StandaloneView
*/
protected function getFluidTemplateObject()
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setLayoutRootPaths([GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Layouts')]);
$view->setPartialRootPaths([GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Partials')]);
$view->setTemplateRootPaths([GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Templates')]);
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:info/Resources/Private/Templates/PageTsConfig.html'));
$view->getRequest()->setControllerExtensionName('info');
return $view;
}
/**
* Called from InfoModuleController until deprecation removal in TYPO3 v10.0
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
public function checkExtObj()
{
if (is_array($this->extClassConf) && $this->extClassConf['name']) {
$this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);
$this->extObj->init($this->pObj, $this->extClassConf);
// Re-write:
$this->pObj->MOD_SETTINGS = BackendUtility::getModuleData($this->pObj->MOD_MENU, GeneralUtility::_GP('SET'), 'web_info');
}
}
/**
* Calls the main function inside ANOTHER sub-submodule which might exist.
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected function extObjContent()
{
if (is_object($this->extObj)) {
return $this->extObj->main();
}
}
/**
* @return BackendUserAuthentication
*/
protected function getBackendUser(): BackendUserAuthentication
{
return $GLOBALS['BE_USER'];
}
/**
* @return LanguageService
*/
protected function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
}
@@ -0,0 +1,292 @@
<?php
namespace TYPO3\CMS\Info\Controller;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\View\PageLayoutView;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Site\Entity\NullSite;
use TYPO3\CMS\Core\Site\Entity\PseudoSite;
use TYPO3\CMS\Core\Site\Entity\Site;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Class for displaying page information (records, page record properties) in Web -> Info
* @internal This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.
*/
class PageInformationController
{
use PublicPropertyDeprecationTrait;
use PublicMethodDeprecationTrait;
/**
* @var array
*/
private $deprecatedPublicProperties = [
'pObj' => 'Using PageInformationController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
'function_key' => 'Using PageInformationController::$function_key is deprecated, property will be removed in TYPO3 v10.0.',
'extClassConf' => 'Using PageInformationController::$extClassConf is deprecated, property will be removed in TYPO3 v10.0.',
'localLangFile' => 'Using PageInformationController::$localLangFile is deprecated, property will be removed in TYPO3 v10.0.',
'extObj' => 'Using PageInformationController::$extObj is deprecated, property will be removed in TYPO3 v10.0.',
];
/**
* @var array
*/
private $deprecatedPublicMethods = [
'modMenu' => 'Using PageInformationController::modMenu() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extObjContent' => 'Using PageInformationController::extObjContent() is deprecated, method will be removed in TYPO3 v10.0.',
];
/**
* @var array
*/
protected $fieldConfiguration = [];
/**
* @var int Value of the GET/POST var 'id'
*/
protected $id;
/**
* @var InfoModuleController Contains a reference to the parent calling object
*/
protected $pObj;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $extObj;
/**
* Can be hardcoded to the name of a locallang.xlf file (from the same directory as the class file) to use/load
* and is included / added to $GLOBALS['LOCAL_LANG']
*
* @var string
*/
protected $localLangFile = '';
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $extClassConf;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $function_key = '';
/**
* Init, called from parent object
*
* @param InfoModuleController $pObj A reference to the parent (calling) object
*/
public function init($pObj)
{
$this->pObj = $pObj;
// Local lang:
if (!empty($this->localLangFile)) {
// @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
$this->getLanguageService()->includeLLFile($this->localLangFile);
}
$this->id = (int)GeneralUtility::_GP('id');
// Setting MOD_MENU items as we need them for logging:
$this->pObj->MOD_MENU = array_merge($this->pObj->MOD_MENU, $this->modMenu());
}
/**
* Main, called from parent object
*
* @return string Output HTML for the module.
*/
public function main()
{
$languageService = $this->getLanguageService();
$theOutput = '<h1>' . htmlspecialchars($languageService->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:page_title')) . '</h1>';
$dblist = GeneralUtility::makeInstance(PageLayoutView::class);
$dblist->descrTable = '_MOD_web_info';
$dblist->thumbs = 0;
/** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
$uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
$dblist->script = (string)$uriBuilder->buildUriFromRoute('web_info');
$dblist->showIcon = 0;
$dblist->setLMargin = 0;
$dblist->agePrefixes = $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.minutesHoursDaysYears');
$dblist->pI_showUser = true;
if (isset($this->fieldConfiguration[$this->pObj->MOD_SETTINGS['pages']])) {
$dblist->fieldArray = $this->fieldConfiguration[$this->pObj->MOD_SETTINGS['pages']]['fields'];
}
// PAGES:
$this->pObj->MOD_SETTINGS['pages_levels'] = $this->pObj->MOD_SETTINGS['depth'];
// ONLY for the sake of dblist module which uses this value.
$h_func = BackendUtility::getDropdownMenu($this->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth']);
$h_func .= BackendUtility::getDropdownMenu($this->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages']);
$dblist->start($this->id, 'pages', 0);
$dblist->generateList();
$theOutput .= '<div class="form-inline form-inline-spaced">'
. $h_func
. '<div class="form-group">'
. BackendUtility::cshItem($dblist->descrTable, 'func_' . $this->pObj->MOD_SETTINGS['pages'], null, '<span class="btn btn-default btn-sm">|</span>')
. '</div>'
. '</div>'
. $dblist->HTMLcode;
// Additional footer content
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'] ?? [] as $hook) {
// @todo: request object should be submitted here as soon as it is available in TYPO3 v10.0.
$params = [];
$theOutput .= GeneralUtility::callUserFunction($hook, $params, $this);
}
return $theOutput;
}
/**
* Returns the menu array
*
* @return array
*/
protected function modMenu()
{
$menu = [
'pages' => [],
'depth' => [
0 => $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_0'),
1 => $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_1'),
2 => $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_2'),
3 => $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_3'),
4 => $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_4'),
999 => $GLOBALS['LANG']->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_infi')
]
];
// Using $GLOBALS['TYPO3_REQUEST'] since $request is not available at this point
// @todo: Refactor mess and have $request available
$this->fillFieldConfiguration($this->id, $GLOBALS['TYPO3_REQUEST']);
foreach ($this->fieldConfiguration as $key => $item) {
$menu['pages'][$key] = $item['label'];
}
return $menu;
}
/**
* Function, which returns all tables to
* which the user has access. Also a set of standard tables (pages, sys_filemounts, etc...)
* are filtered out. So what is left is basically all tables which makes sense to list content from.
*
* @return string
*/
protected function cleanTableNames(): string
{
// Get all table names:
$tableNames = array_flip(array_keys($GLOBALS['TCA']));
// Unset common names:
unset($tableNames['pages']);
unset($tableNames['sys_filemounts']);
unset($tableNames['sys_action']);
unset($tableNames['sys_workflows']);
unset($tableNames['be_users']);
unset($tableNames['be_groups']);
$allowedTableNames = [];
// Traverse table names and set them in allowedTableNames array IF they can be read-accessed by the user.
if (is_array($tableNames)) {
foreach ($tableNames as $k => $v) {
if (!$GLOBALS['TCA'][$k]['ctrl']['hideTable'] && $this->getBackendUser()->check('tables_select', $k)) {
$allowedTableNames['table_' . $k] = $k;
}
}
}
return implode(',', array_keys($allowedTableNames));
}
/**
* Generate configuration for field selection
*
* @param int $pageId current page id
* @param ServerRequestInterface $request
*/
protected function fillFieldConfiguration(int $pageId, ServerRequestInterface $request)
{
$modTSconfig = BackendUtility::getPagesTSconfig($pageId)['mod.']['web_info.']['fieldDefinitions.'] ?? [];
foreach ($modTSconfig as $key => $item) {
$fieldList = str_replace('###ALL_TABLES###', $this->cleanTableNames(), $item['fields']);
$fields = GeneralUtility::trimExplode(',', $fieldList, true);
if ((int)$key === 0) {
// If "Basic settings" is rendered, hide the alias field on trees that have a site configuration
// and hide the slug field on PseudoSites. On NullSites (pid 0), show both.
$site = $request->getAttribute('site');
if ($site instanceof PseudoSite) {
$fields = array_diff($fields, ['slug']);
} elseif ($site instanceof Site && !$site instanceof NullSite) {
$fields = array_diff($fields, ['alias']);
}
}
$key = trim($key, '.');
$this->fieldConfiguration[$key] = [
'label' => $item['label'] ? $GLOBALS['LANG']->sL($item['label']) : $key,
'fields' => $fields
];
}
}
/**
* Called from InfoModuleController until deprecation removal in TYPO3 v10.0
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
public function checkExtObj()
{
if (is_array($this->extClassConf) && $this->extClassConf['name']) {
$this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);
$this->extObj->init($this->pObj, $this->extClassConf);
// Re-write:
$this->pObj->MOD_SETTINGS = BackendUtility::getModuleData($this->pObj->MOD_MENU, GeneralUtility::_GP('SET'), 'web_info');
}
}
/**
* Calls the main function inside ANOTHER sub-submodule which might exist.
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected function extObjContent()
{
if (is_object($this->extObj)) {
return $this->extObj->main();
}
}
/**
* @return BackendUserAuthentication
*/
protected function getBackendUser(): BackendUserAuthentication
{
return $GLOBALS['BE_USER'];
}
/**
* @return LanguageService
*/
protected function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
}
@@ -0,0 +1,609 @@
<?php
namespace TYPO3\CMS\Info\Controller;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Tree\View\PageTreeView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\BackendWorkspaceRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Site\Entity\SiteInterface;
use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
use TYPO3\CMS\Core\Type\Bitmask\Permission;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Class for displaying translation status of pages in the tree in Web -> Info
* @internal This class is a specific Backend controller implementation and is not part of the TYPO3's Core API.
*/
class TranslationStatusController
{
use PublicPropertyDeprecationTrait;
use PublicMethodDeprecationTrait;
/**
* @var array
*/
private $deprecatedPublicProperties = [
'pObj' => 'Using TranslationStatusController::$pObj is deprecated and will not be possible anymore in TYPO3 v10.0.',
'function_key' => 'Using TranslationStatusController::function_key$ is deprecated, property will be removed in TYPO3 v10.0.',
'extClassConf' => 'Using TranslationStatusController::$extClassConf is deprecated, property will be removed in TYPO3 v10.0.',
'localLangFile' => 'Using TranslationStatusController::$localLangFile is deprecated, property will be removed in TYPO3 v10.0.',
'extObj' => 'Using TranslationStatusController::$extObj is deprecated, property will be removed in TYPO3 v10.0.',
];
/**
* @var array
*/
private $deprecatedPublicMethods = [
'getContentElementCount' => 'Using TranslationStatusController::getContentElementCount() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'getLangStatus' => 'Using TranslationStatusController::getLangStatus() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'renderL10nTable' => 'Using TranslationStatusController::renderL10nTable() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'modMenu' => 'Using TranslationStatusController::modMenu() is deprecated and will not be possible anymore in TYPO3 v10.0.',
'extObjContent' => 'Using TranslationStatusController::extObjContent() is deprecated, method will be removed in TYPO3 v10.0.',
];
/**
* @var IconFactory
*/
protected $iconFactory;
/**
* @var SiteLanguage[]
*/
protected $siteLanguages;
/**
* @var InfoModuleController Contains a reference to the parent calling object
*/
protected $pObj;
/**
* @var int Value of the GET/POST var 'id'
*/
protected $id;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $extObj;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $localLangFile = '';
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $extClassConf;
/**
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected $function_key = '';
/**
* Init, called from parent object
*
* @param InfoModuleController $pObj A reference to the parent (calling) object
*/
public function init($pObj)
{
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$this->id = (int)GeneralUtility::_GP('id');
$this->initializeSiteLanguages();
$this->pObj = $pObj;
// Local lang:
if (!empty($this->localLangFile)) {
// @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
$this->getLanguageService()->includeLLFile($this->localLangFile);
}
// Setting MOD_MENU items as we need them for logging:
$this->pObj->MOD_MENU = array_merge($this->pObj->MOD_MENU, $this->modMenu());
}
/**
* Main, called from parent object
*
* @return string Output HTML for the module.
*/
public function main()
{
$theOutput = '<h1>' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_title')) . '</h1>';
if ($this->id) {
$this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Info/TranslationStatus');
// Depth selector:
$theOutput .= '<div class="form-inline form-inline-spaced">';
$h_func = BackendUtility::getDropdownMenu($this->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth']);
$h_func .= BackendUtility::getDropdownMenu($this->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang']);
$theOutput .= $h_func;
// Add CSH:
$theOutput .= BackendUtility::cshItem('_MOD_web_info', 'lang', null, '<div class="form-group"><span class="btn btn-default btn-sm">|</span></div><br />');
$theOutput .= '</div>';
// Showing the tree:
// Initialize starting point of page tree:
$treeStartingPoint = (int)$this->id;
$treeStartingRecord = BackendUtility::getRecordWSOL('pages', $treeStartingPoint);
$depth = $this->pObj->MOD_SETTINGS['depth'];
// Initialize tree object:
$tree = GeneralUtility::makeInstance(PageTreeView::class);
$tree->init('AND ' . $this->getBackendUser()->getPagePermsClause(Permission::PAGE_SHOW));
$tree->addField('l18n_cfg');
// Creating top icon; the current page
$HTML = $this->iconFactory->getIconForRecord('pages', $treeStartingRecord, Icon::SIZE_SMALL)->render();
$tree->tree[] = [
'row' => $treeStartingRecord,
'HTML' => $HTML
];
// Create the tree from starting point:
if ($depth) {
$tree->getTree($treeStartingPoint, $depth, '');
}
// Render information table:
$theOutput .= $this->renderL10nTable($tree);
}
return $theOutput;
}
/**
* Returns the menu array
*
* @return array
*/
protected function modMenu()
{
$lang = $this->getLanguageService();
$menuArray = [
'depth' => [
0 => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_0'),
1 => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_1'),
2 => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_2'),
3 => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_3'),
4 => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_4'),
999 => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.depth_infi')
]
];
// Languages:
$menuArray['lang'] = [];
foreach ($this->siteLanguages as $language) {
if ($language->getLanguageId() === 0) {
$menuArray['lang'][0] = '[All]';
} else {
$menuArray['lang'][$language->getLanguageId()] = $language->getTitle();
}
}
return $menuArray;
}
/**
* Rendering the localization information table.
*
* @param array $tree The Page tree data
* @return string HTML for the localization information table.
*/
protected function renderL10nTable(&$tree)
{
$lang = $this->getLanguageService();
// Title length:
$titleLen = $this->getBackendUser()->uc['titleLen'];
// Put together the TREE:
$output = '';
$newOL_js = [];
$langRecUids = [];
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$userTsConfig = $this->getBackendUser()->getTSConfig();
$showPageId = !empty($userTsConfig['options.']['pageTree.']['showPageIdWithTitle']);
foreach ($tree->tree as $data) {
$tCells = [];
$langRecUids[0][] = $data['row']['uid'];
$pageTitle = ($showPageId ? '[' . (int)$data['row']['uid'] . '] ' : '') . GeneralUtility::fixed_lgd_cs($data['row']['title'], $titleLen);
// Page icons / titles etc.
$tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' .
($data['depthData'] ?: '') .
BackendUtility::wrapClickMenuOnIcon($data['HTML'], 'pages', $data['row']['uid']) .
'<a href="#" onclick="' . htmlspecialchars(
'top.loadEditId(' . (int)$data['row']['uid'] . ',"&SET[language]=0"); return false;'
) . '" title="' . $lang->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editPage') . '">' .
htmlspecialchars($pageTitle) .
'</a>' .
((string)$data['row']['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') .
'</td>';
// DEFAULT language:
// "View page" link is created:
$viewPageLink = '<a href="#" onclick="' . htmlspecialchars(
BackendUtility::viewOnClick(
$data['row']['uid'],
'',
null,
'',
'',
'&L=###LANG_UID###'
)
) . '" class="btn btn-default" title="' . $lang->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' .
$this->iconFactory->getIcon('actions-view', Icon::SIZE_SMALL)->render() . '</a>';
$status = GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? 'danger' : 'success';
// Create links:
$editUrl = (string)$uriBuilder->buildUriFromRoute('record_edit', [
'edit' => [
'pages' => [
$data['row']['uid'] => 'edit'
]
],
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$info = '<a href="#" onclick="' . htmlspecialchars(
BackendUtility::viewOnClick(
$data['row']['uid'],
'',
null,
'',
'',
''
)
) . '" class="btn btn-default" title="' . $lang->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_viewPage') . '">' .
$this->iconFactory->getIcon('actions-view-page', Icon::SIZE_SMALL)->render() . '</a>';
$info .= '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editDefaultLanguagePage'
) . '">' . $this->iconFactory->getIcon('actions-page-open', Icon::SIZE_SMALL)->render() . '</a>';
$info .= '&nbsp;';
$info .= GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.l18n_cfg.I.1')) . '">D</span>' : '&nbsp;';
$info .= GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) ? '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.l18n_cfg.I.2')) . '">N</span>' : '&nbsp;';
// Put into cell:
$tCells[] = '<td class="' . $status . ' col-border-left"><div class="btn-group">' . $info . '</div></td>';
$tCells[] = '<td class="' . $status . '" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_CEcount'
) . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
// Traverse system languages:
foreach ($this->siteLanguages as $siteLanguage) {
$languageId = $siteLanguage->getLanguageId();
if ($languageId === 0) {
continue;
}
if ($this->pObj->MOD_SETTINGS['lang'] == 0 || (int)$this->pObj->MOD_SETTINGS['lang'] === $languageId) {
$row = $this->getLangStatus($data['row']['uid'], $languageId);
if (is_array($row)) {
$langRecUids[$languageId][] = $row['uid'];
$status = $row['_HIDDEN'] ? (GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? 'danger' : '') : 'success';
$icon = $this->iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL)->render();
$info = $icon . ($showPageId ? ' [' . (int)$row['uid'] . ']' : '') . ' ' . htmlspecialchars(
GeneralUtility::fixed_lgd_cs($row['title'], $titleLen)
) . ((string)$row['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(
GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen)
) . '</em>]' : '') . ($row['_COUNT'] > 1 ? '<div>' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_badThingThereAre'
) . '</div>' : '');
$tCells[] = '<td class="' . $status . ' col-border-left">' .
'<a href="#" onclick="' . htmlspecialchars(
'top.loadEditId(' . (int)$data['row']['uid'] . ',"&SET[language]=' . $languageId . '"); return false;'
) . '" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editPageLang'
) . '">' . $info . '</a></td>';
// Edit whole record:
// Create links:
$editUrl = (string)$uriBuilder->buildUriFromRoute('record_edit', [
'edit' => [
'pages' => [
$row['uid'] => 'edit'
]
],
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$info = str_replace('###LANG_UID###', $languageId, $viewPageLink);
$info .= '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editLanguageOverlayRecord'
) . '">' . $this->iconFactory->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
$tCells[] = '<td class="' . $status . '"><div class="btn-group">' . $info . '</div></td>';
$tCells[] = '<td class="' . $status . '" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_CEcount'
) . '" align="center">' . $this->getContentElementCount($data['row']['uid'], $languageId) . '</td>';
} else {
$status = GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || GeneralUtility::hideIfDefaultLanguage($data['row']['l18n_cfg']) ? 'danger' : '';
$info = '<div class="btn-group"><label class="btn btn-default btn-checkbox">';
$info .= '<input type="checkbox" data-lang="' . $languageId . '" data-uid="' . (int)$data['row']['uid'] . '" name="newOL[' . $languageId . '][' . $data['row']['uid'] . ']" value="1" />';
$info .= '<span class="t3-icon fa"></span></label></div>';
$newOL_js[$languageId] .=
' +(document.webinfoForm['
. GeneralUtility::quoteJSvalue('newOL[' . $languageId . '][' . $data['row']['uid'] . ']')
. '].checked ? '
. GeneralUtility::quoteJSvalue('&edit[pages][' . $data['row']['uid'] . ']=new')
. ' : \'\')'
;
$tCells[] = '<td class="' . $status . ' col-border-left">&nbsp;</td>';
$tCells[] = '<td class="' . $status . '">&nbsp;</td>';
$tCells[] = '<td class="' . $status . '">' . $info . '</td>';
}
}
}
$output .= '
<tr>
' . implode('
', $tCells) . '
</tr>';
}
// Put together HEADER:
$tCells = [];
$tCells[] = '<td>' . $lang->sL('LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_page') . '</td>';
if (is_array($langRecUids[0])) {
$editUrl = (string)$uriBuilder->buildUriFromRoute('record_edit', [
'edit' => [
'pages' => [
implode(',', $langRecUids[0]) => 'edit'
]
],
'columnsOnly' => 'title,nav_title,l18n_cfg,hidden',
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$editIco = '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editPageProperties'
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
} else {
$editIco = '';
}
$tCells[] = '<td class="col-border-left" colspan="2">' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_default'
) . '&nbsp;' . $editIco . '</td>';
foreach ($this->siteLanguages as $siteLanguage) {
$languageId = $siteLanguage->getLanguageId();
if ($languageId === 0) {
continue;
}
if ($this->pObj->MOD_SETTINGS['lang'] == 0 || (int)$this->pObj->MOD_SETTINGS['lang'] === $languageId) {
// Title:
$tCells[] = '<td class="col-border-left">' . htmlspecialchars($siteLanguage->getTitle()) . '</td>';
// Edit language overlay records:
if (is_array($langRecUids[$languageId])) {
$editUrl = (string)$uriBuilder->buildUriFromRoute('record_edit', [
'edit' => [
'pages' => [
implode(',', $langRecUids[$languageId]) => 'edit'
]
],
'columnsOnly' => 'title,nav_title,hidden',
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$editButton = '<a href="' . htmlspecialchars($editUrl)
. '" class="btn btn-default" title="' . $lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_renderl10n_editLangOverlays'
) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
} else {
$editButton = '';
}
// Create new overlay records:
$createLink = (string)$uriBuilder->buildUriFromRoute('tce_db', [
'redirect' => GeneralUtility::getIndpEnv('REQUEST_URI')
]);
$newButton = '<a href="' .
htmlspecialchars($createLink) .
'" data-edit-url="' .
htmlspecialchars($createLink) .
'" class="btn btn-default disabled t3js-language-new-' .
$languageId .
'" title="' .
$lang->sL(
'LLL:EXT:info/Resources/Private/Language/locallang_webinfo.xlf:lang_getlangsta_createNewTranslationHeaders'
) .
'">' .
$this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render() .
'</a>';
$tCells[] = '<td class="btn-group">' . $editButton . $newButton . '</td>';
$tCells[] = '<td>&nbsp;</td>';
}
}
$output =
'<div class="table-fit">' .
'<table class="table table-striped table-hover" id="langTable">' .
'<thead>' .
'<tr>' .
implode('', $tCells) .
'</tr>' .
'</thead>' .
'<tbody>' .
$output .
'</tbody>' .
'</table>' .
'</div>';
return $output;
}
/**
* Selects all system languages (from sys_language)
*
* @return array System language records in an array.
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0
*/
public function getSystemLanguages()
{
trigger_error('This method will be removed in TYPO3 v10.0.', E_USER_DEPRECATED);
if (!$this->getBackendUser()->isAdmin() && $this->getBackendUser()->groupData['allowed_languages'] !== '') {
$allowed_languages = array_flip(explode(',', $this->getBackendUser()->groupData['allowed_languages']));
}
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('sys_language')
->select('*')
->from('sys_language')
->orderBy('sorting');
$res = $queryBuilder->execute();
$outputArray = [];
if (is_array($allowed_languages) && !empty($allowed_languages)) {
while ($output = $res->fetch()) {
if (isset($allowed_languages[$output['uid']])) {
$outputArray[] = $output;
}
}
} else {
$outputArray = $res->fetchAll();
}
return $outputArray;
}
/**
* Get an alternative language record for a specific page / language
*
* @param int $pageId Page ID to look up for.
* @param int $langId Language UID to select for.
* @return array translated pages record
*/
protected function getLangStatus($pageId, $langId)
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('pages');
$queryBuilder
->getRestrictions()
->removeAll()
->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class))
->add(GeneralUtility::makeInstance(DeletedRestriction::class));
$result = $queryBuilder
->select('*')
->from('pages')
->where(
$queryBuilder->expr()->eq(
$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'],
$queryBuilder->createNamedParameter($pageId, \PDO::PARAM_INT)
)
)
->andWhere(
$queryBuilder->expr()->eq(
$GLOBALS['TCA']['pages']['ctrl']['languageField'],
$queryBuilder->createNamedParameter($langId, \PDO::PARAM_INT)
)
)
->execute();
$row = $result->fetch();
BackendUtility::workspaceOL('pages', $row);
if (is_array($row)) {
$row['_COUNT'] = $queryBuilder->count('uid')->execute()->fetchColumn(0);
$row['_HIDDEN'] = $row['hidden'] || (int)$row['endtime'] > 0 && (int)$row['endtime'] < $GLOBALS['EXEC_TIME'] || $GLOBALS['EXEC_TIME'] < (int)$row['starttime'];
}
$result->closeCursor();
return $row;
}
/**
* Counting content elements for a single language on a page.
*
* @param int $pageId Page id to select for.
* @param int $sysLang Sys language uid
* @return int Number of content elements from the PID where the language is set to a certain value.
*/
protected function getContentElementCount($pageId, $sysLang)
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()
->removeAll()
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
$count = $queryBuilder
->count('uid')
->from('tt_content')
->where(
$queryBuilder->expr()->eq(
'pid',
$queryBuilder->createNamedParameter($pageId, \PDO::PARAM_INT)
)
)
->andWhere(
$queryBuilder->expr()->eq(
'sys_language_uid',
$queryBuilder->createNamedParameter($sysLang, \PDO::PARAM_INT)
)
)
->execute()
->fetchColumn(0);
return $count ?: '-';
}
/**
* Since the AbstractFunctionModule cannot access the current request yet, we'll do it "old school"
* to fetch the Site based on the current ID.
*/
protected function initializeSiteLanguages()
{
/** @var SiteInterface $currentSite */
$currentSite = $GLOBALS['TYPO3_REQUEST']->getAttribute('site');
$this->siteLanguages = $currentSite->getAvailableLanguages($this->getBackendUser(), false, (int)$this->id);
}
/**
* Called from InfoModuleController until deprecation removal in TYPO3 v10.0
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
public function checkExtObj()
{
if (is_array($this->extClassConf) && $this->extClassConf['name']) {
$this->extObj = GeneralUtility::makeInstance($this->extClassConf['name']);
$this->extObj->init($this->pObj, $this->extClassConf);
// Re-write:
$this->pObj->MOD_SETTINGS = BackendUtility::getModuleData($this->pObj->MOD_MENU, GeneralUtility::_GP('SET'), 'web_info');
}
}
/**
* Calls the main function inside ANOTHER sub-submodule which might exist.
*
* @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0.
*/
protected function extObjContent()
{
if (is_object($this->extObj)) {
return $this->extObj->main();
}
}
/**
* @return LanguageService
*/
protected function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
/**
* Returns the current BE user.
*
* @return BackendUserAuthentication
*/
protected function getBackendUser(): BackendUserAuthentication
{
return $GLOBALS['BE_USER'];
}
/**
* @return PageRenderer
*/
protected function getPageRenderer(): PageRenderer
{
return GeneralUtility::makeInstance(PageRenderer::class);
}
}
+345
View File
@@ -0,0 +1,345 @@
Some icons used in the TYPO3 project are retrieved from the "Silk" icon set of
Mark James, which can be found at http://famfamfam.com/lab/icons/silk/. This
set is distributed under a Creative Commons Attribution 2.5 License. The
license can be found at http://creativecommons.org/licenses/by/2.5/.
---------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
@@ -0,0 +1,6 @@
<?php
return [
'TYPO3\\CMS\\Frontend\\Controller\\PageInformationController' => \TYPO3\CMS\Info\Controller\PageInformationController::class,
'TYPO3\\CMS\\Frontend\\Controller\\TranslationStatusController' => \TYPO3\CMS\Info\Controller\TranslationStatusController::class,
'TYPO3\\CMS\\InfoPagetsconfig\\Controller\\InfoPageTyposcriptConfigController' => \TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController::class,
];
@@ -0,0 +1,19 @@
<?php
namespace {
die('Access denied');
}
namespace TYPO3\CMS\Frontend\Controller {
class PageInformationController extends \TYPO3\CMS\Info\Controller\PageInformationController
{
}
class TranslationStatusController extends \TYPO3\CMS\Info\Controller\TranslationStatusController
{
}
}
namespace TYPO3\CMS\InfoPagetsconfig\Controller {
class InfoPageTyposcriptConfigController extends \TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController
{
}
}
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file t3:id="1415814840" source-language="en" datatype="plaintext" original="EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf" date="2011-10-17T20:22:33Z" product-name="info_pagetsconfig">
<header/>
<body>
<trans-unit id="tsconf_title" resname="tsconf_title">
<source>Page TSconfig</source>
</trans-unit>
<trans-unit id="tsconf_parts_0" resname="tsconf_parts_0">
<source>All</source>
</trans-unit>
<trans-unit id="tsconf_parts_1" resname="tsconf_parts_1">
<source>Module key ('mod') with overruling user settings</source>
</trans-unit>
<trans-unit id="tsconf_parts_1a" resname="tsconf_parts_1a">
<source>Module: Web&gt;Page</source>
</trans-unit>
<trans-unit id="tsconf_parts_1b" resname="tsconf_parts_1b">
<source>Module: Web&gt;View</source>
</trans-unit>
<trans-unit id="tsconf_parts_1c" resname="tsconf_parts_1c">
<source>Module: Web&gt;Modules</source>
</trans-unit>
<trans-unit id="tsconf_parts_1d" resname="tsconf_parts_1d">
<source>Module: Web&gt;List</source>
</trans-unit>
<trans-unit id="tsconf_parts_1e" resname="tsconf_parts_1e">
<source>Module: Web&gt;Info</source>
</trans-unit>
<trans-unit id="tsconf_parts_1f" resname="tsconf_parts_1f">
<source>Module: Web&gt;Func</source>
</trans-unit>
<trans-unit id="tsconf_parts_1g" resname="tsconf_parts_1g">
<source>Module: Web&gt;Template</source>
</trans-unit>
<trans-unit id="tsconf_configFields" resname="tsconf_configFields">
<source>View TSconfig fields content</source>
</trans-unit>
<trans-unit id="editThisColumn" resname="editThisColumn">
<source>Edit the field '%s' for all listed pages</source>
</trans-unit>
<trans-unit id="editTSconfig" resname="editTSconfig">
<source>Edit TSconfig for this page</source>
</trans-unit>
<trans-unit id="editTSconfig_all" resname="editTSconfig_all">
<source>Edit TSconfig for all shown pages</source>
</trans-unit>
<trans-unit id="editTSconfig_default" resname="editTSconfig_default">
<source>Default Configuration from TYPO3_CONF_VARS</source>
</trans-unit>
<trans-unit id="mod_pagetsconfig" resname="mod_pagetsconfig">
<source>Page TSconfig</source>
</trans-unit>
<trans-unit id="sort_alphabetic" resname="sort_alphabetic">
<source>Sort alphabetically</source>
</trans-unit>
<trans-unit id="pagetitle" resname="pagetitle">
<source>Pagetitle:</source>
</trans-unit>
<trans-unit id="included_tsconfig_files" resname="included_tsconfig_files">
<source>Included Files:</source>
</trans-unit>
<trans-unit id="written_tsconfig_lines" resname="written_tsconfig_lines">
<source>Lines:</source>
</trans-unit>
<trans-unit id="tsconf_noPageTSconfig" resname="tsconf_noPageTSconfig">
<source>There are no pages containing custom Page TSconfig settings in the page configuration.</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file t3:id="1415814841" source-language="en" datatype="plaintext" original="EXT:info/Resources/Private/Language/locallang_csh_tsconfigInfo.xlf" date="2011-10-17T20:22:33Z" product-name="info_pagetsconfig">
<header/>
<body>
<trans-unit id="tsconfig_hierarchy.alttitle" resname="tsconfig_hierarchy.alttitle">
<source>Page TSconfig hierarchy viewer</source>
</trans-unit>
<trans-unit id="tsconfig_hierarchy.description" resname="tsconfig_hierarchy.description">
<source>Allows the user to view the compiled Page TSconfig structure for a branch of the pagetree.</source>
</trans-unit>
<trans-unit id="tsconfig_hierarchy.details" resname="tsconfig_hierarchy.details" xml:space="preserve">
<source>This viewer is indispensable for getting an overview of Page TSconfig settings as they apply to various branches in the page tree. You can see the configuration structure of any page where all inherited Page TSconfig is parsed and the result shown. This helps you to evaluate that the settings you have applied are actually found at the correct position in the configuration tree.
You can also see the Page TSconfig TypoScript code for each page in the root line with the viewer.
See the links for more information about what Page TSconfig is.</source>
</trans-unit>
<trans-unit id="_tsconfig_hierarchy.seeAlso" resname="_tsconfig_hierarchy.seeAlso" xml:space="preserve">
<source>_MOD_web_info:tsconfig_edit,
pages:TSconfig,
Page TSconfig objects | https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/Index.html</source>
<note from="developer">A part of this string is an internal text, which must not be changed. Just copy this part into the translation field and do not change it. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="_tsconfig_hierarchy.image" resname="_tsconfig_hierarchy.image" xml:space="preserve">
<source>EXT:info_pagetsconfig/Resources/Public/Images/cshimages/img_1.png,
EXT:info_pagetsconfig/Resources/Public/Images/cshimages/img_2.png,</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="tsconfig_hierarchy.image_descr" resname="tsconfig_hierarchy.image_descr" xml:space="preserve">
<source>This is how the parsed Page TSconfig tree can look. It contains the "sum" of all the configuration code from the root line and any default settings. This shows the whole tree but you can also select other top level objects (TLO) in the selector box in the top if you want to limit the view to a single branch
One of the branches in Page TSconfig has the special property that it is overridden with any User TSconfig in the same object path given for the current backend user. When you view only the "mod" TLO any user settings for the current backend user are applied as well. Here it is evident that some additional settings must apply for the user since only "mod.SHARED.colPos_list" was actually found in Page TSconfig (according to the "All" view in the first image).</source>
</trans-unit>
<trans-unit id="tsconfig_edit.alttitle" resname="tsconfig_edit.alttitle">
<source>Page TSconfig content viewer</source>
</trans-unit>
<trans-unit id="tsconfig_edit.description" resname="tsconfig_edit.description">
<source>Displays the raw TSconfig code of all pages in the current root line including any default code.</source>
</trans-unit>
<trans-unit id="tsconfig_edit.details" resname="tsconfig_edit.details" xml:space="preserve">
<source>The parsed Page TSconfig tree you see in the default view is actually compiled from this TSconfig code in the order it appears here. This view lets you see how the parsed version came to be.
You can also click the edit-icons of the various pages to go directly to the TSconfig fields of the pages.</source>
</trans-unit>
<trans-unit id="_tsconfig_edit.seeAlso" resname="_tsconfig_edit.seeAlso">
<source>_MOD_web_info:tsconfig_hierarchy</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="_tsconfig_edit.image" resname="_tsconfig_edit.image" xml:space="preserve">
<source>EXT:info_pagetsconfig/Resources/Public/Images/cshimages/img_3.png,
EXT:info_pagetsconfig/Resources/Public/Images/cshimages/img_4.png,
EXT:info_pagetsconfig/Resources/Public/Images/cshimages/img_5.png</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="tsconfig_edit.image_descr" resname="tsconfig_edit.image_descr" xml:space="preserve">
<source>Shows the raw Page TSconfig code. First you see the default content from TYPO3_CONF_VARS (probably added by extensions), then the content from the "TSconfig" field of the first page in the root line ("Intro") and then for each root line page up to the current page (not shown in screenshot).
In the bottom of the page you will see a link which will open editing forms for all of the TSconfig fields shown in the list!
Here you see specifically the TSconfig fields of the first and second page in the rootline being edited. Notice the "TS" icon next to the first field - this will bring up a wizard that helps you to select among available Page TSconfig properties.</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file t3:id="1415814862" source-language="en" datatype="plaintext" original="EXT:info/Resources/Private/Language/locallang_csh_web_info.xlf" date="2011-10-17T20:22:33Z" product-name="lang">
<header/>
<body>
<trans-unit id=".alttitle" resname=".alttitle">
<source>Web &gt; Info module</source>
</trans-unit>
<trans-unit id=".description" resname=".description">
<source>The idea of the Web&gt;Info module is to be a host module for backend applications that wish to present information / analysis of pages or branches of the page tree. This could be website statistics, caching status information etc.</source>
</trans-unit>
<trans-unit id=".details" resname=".details">
<source>The Web&gt;Info module shows information rather than offering functionality. It is up to extension programmers to decide in which of these two modules they want to insert functionality.</source>
</trans-unit>
<trans-unit id="_.image" resname="_.image">
<source>EXT:info/Resources/Public/Images/cshimages/pagetree_overview_10.png</source>
</trans-unit>
<trans-unit id=".image_descr" resname=".image_descr">
<source>The Web&gt;Info module as provided by the core is an empty shell. It provides an API that extensions can use to attach function menu items to the Info module. Here you see the "Page TSconfig" overview from the extension "info_pagetsconfig".</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file t3:id="1415814788" source-language="en" datatype="plaintext" original="EXT:info/Resources/Private/Language/locallang_csh_webinfo.xlf" date="2011-10-17T20:22:32Z" product-name="cms">
<header/>
<body>
<trans-unit id="func_0.alttitle" resname="func_0.alttitle">
<source>Basic Settings</source>
</trans-unit>
<trans-unit id="func_0.description" resname="func_0.description">
<source>Displays a selection of fields from page records which are regarded as foundational settings for pages. That includes aliases, start- and stop times, access restriction information etc.</source>
</trans-unit>
<trans-unit id="func_0.details" resname="func_0.details" xml:space="preserve">
<source>The Basic Settings view resembles the Cache and Age view quite a lot. They are different only by the selection of fields they show.
&lt;b&gt;Batch editing page fields&lt;/b&gt;
You will find multiple edit-icons around the interface. All edit icons in head lines will bring you to an editing dialog where you can change exactly that field for all listed tables! Very useful for batch-editing of say all "Start" times.
If you click the edit icon at the ID numbers of pages you will get straight to the regular editing of a whole page record.</source>
</trans-unit>
<trans-unit id="_func_0.seeAlso" resname="_func_0.seeAlso" xml:space="preserve">
<source>xMOD_csh_corebe:list_module,
_MOD_web_info:func_2,
_MOD_web_info:pagetree_overview</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="_func_0.image" resname="_func_0.image" xml:space="preserve">
<source>EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_4.png,
EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_8.png,
EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_9.png</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="func_0.image_descr" resname="func_0.image_descr" xml:space="preserve">
<source>The Basic Settings view offers a very convenient overview of page aliases, start times and access restriction settings in the tree branch.
If you click an edit-icon in the header you will be able to edit that field for all listed pages.</source>
</trans-unit>
<trans-unit id="func_1.alttitle" resname="func_1.alttitle">
<source>Record Overview</source>
</trans-unit>
<trans-unit id="func_1.description" resname="func_1.description">
<source>Record overview gives you an indispensable overview of the distribution of records in the page tree. Each database table in the system is represented with a column and for each page you can see the number of records from that table located on the page.</source>
</trans-unit>
<trans-unit id="func_1.details" resname="func_1.details" xml:space="preserve">
<source>&lt;b&gt;Notice:&lt;/b&gt; Be careful with the level-setting. A high level-setting may cause the module to respond very slowly if there are many pages and many records in the database as well!
&lt;b&gt;Tree stop?&lt;/b&gt;
Notice the red "+" next to a page in the page tree? This is due to a setting for that page record which means that the page tree will not expand for this page. Typically this is set for protection when there are a large amount of subpages underneath (hundreds of pages typically). If you click the icon/title the overview will jump to make this page the new root of the overview.</source>
</trans-unit>
<trans-unit id="_func_1.seeAlso" resname="_func_1.seeAlso" xml:space="preserve">
<source>_MOD_web_info:pagetree_overview,
pages:php_tree_stop</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="_func_1.image" resname="_func_1.image">
<source>EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_6.png</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="func_1.image_descr" resname="func_1.image_descr">
<source>You can easily see the distribution of Content Elements on a page. You can also see where Template Records - and basically any record! - are located in the page tree!</source>
</trans-unit>
<trans-unit id="func_2.alttitle" resname="func_2.alttitle">
<source>Cache and Age</source>
</trans-unit>
<trans-unit id="func_2.description" resname="func_2.description">
<source>Displays a selection of fields from page records related to page caching and time settings.</source>
</trans-unit>
<trans-unit id="_func_2.seeAlso" resname="_func_2.seeAlso" xml:space="preserve">
<source>_MOD_web_info:func_0,
_MOD_web_info:pagetree_overview,
pages:TSconfig</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="_func_2.image" resname="_func_2.image" xml:space="preserve">
<source>EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_5.png,
EXT:frontend/Resources/Public/Images/cshimages/pagetree_overview_7.png</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="func_2.image_descr" resname="func_2.image_descr" xml:space="preserve">
<source>The "Cache and Age" view.
Here you see the "TSconfig" column. The overview exposes that these two pages include some Page TSconfig code!</source>
</trans-unit>
<trans-unit id="lang.details" resname="lang.details" xml:space="preserve">
<source>The overview uses colors to signal the availability and fall back situation for a given page. Here is a description for each color code:
&lt;b&gt;Green background:&lt;/b&gt; Page is translated and viewable in this language. For translations it means that an active page overlay record is present.
&lt;b&gt;Red background:&lt;/b&gt; Page &lt;em&gt;cannot&lt;/em&gt; be viewed in this language and you will see an error message if you try. Menus should automatically filter out links to pages with this translation.
&lt;b&gt;Gray background (not available for default language):&lt;/b&gt; Page will fall back to the specified fallback mode for content. Depends on configuration. (sys_language_mode = content_fallback is recommended for most flexible fallback, sys_language_mode = strict will prevent this and issue an error instead!)
&lt;b&gt;The pages "Localization settings:"&lt;/b&gt;
It is the "Localization settings" of the page record that determines the modes above. In the column of the default language each of these settings are represented by a "N" (Hide page if no translation for current language exists) or a "D" (Hide default language of page).
As you can see the page "Startpage" has the N flag set and therefore any access to the german version of that page will be blocked with an error message because there is no translation in german. By default "german access" to a non-translated page will just show the english content.
There is also a page with the D flag ("[Dummy]"). The D flag means that the page is only available in one of the translations, in this case Danish. So any attempt to access the page in the default language or german will show an error message.
So, when the "Localization settings" checkboxes for a page are used, you will get an error message when you try to request a page which has been blocked. This is a feature. The trick is not to create links to those pages.
Menus generated from HMENU objects will always take "sys_language" into account and display only pages which can be accessed for that language. But combined with the "localization settings" of pages which may block page access this becomes a problem with pages which are &lt;em&gt;not&lt;/em&gt; translated (has gray background); You might get menu items which links to non-accessible pages.
The problem basically is that "&amp;L=xx" is different from internal "sys_language". You would like to avoid that and to do so you should configure "sys_language_mode" to "content_fallback". If you do that sys_language will &lt;em&gt;always&lt;/em&gt; follow what "&amp;L=" instructs it to and your menus will be right. At the same time you will get the default content displayed if no translation exists (because content selection falls back).
Finally, the number found in each column tells you how many content elements are found in the specified language.</source>
</trans-unit>
<trans-unit id="_lang.image" resname="_lang.image" xml:space="preserve">
<source>EXT:frontend/Resources/Public/Images/cshimages/localizationoverview.png,
EXT:frontend/Resources/Public/Images/cshimages/localizationoverview1.png</source>
<note from="developer">This string contains an internal text, which must not be changed. Just copy the original text into the translation field. For more information have a look at the Tutorial.</note>
</trans-unit>
<trans-unit id="lang.image_descr" resname="lang.image_descr" xml:space="preserve">
<source>Localization overview in the Web&gt;Info module. Use the buttons to edit, view and create new page translation headers. Use the regular page module to put localized content on the pages.
The "Localization settings" that affect availability of pages in the various languages.</source>
</trans-unit>
<trans-unit id="lang.alttitle" resname="lang.alttitle">
<source>Localization overview</source>
</trans-unit>
<trans-unit id="lang.description" resname="lang.description">
<source>Gives an overview of which pages in the page tree are translated to the system languages installed.</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file t3:id="1415814880" source-language="en" datatype="plaintext" original="EXT:info/Resources/Private/Language/locallang_mod_web_info.xlf" date="2011-10-17T20:22:34Z" product-name="lang">
<header/>
<body>
<trans-unit id="title" resname="title">
<source>Page information</source>
</trans-unit>
<trans-unit id="mlang_labels_tablabel" resname="mlang_labels_tablabel">
<source>Page related information, eg. hit statistics, change log, record counts</source>
</trans-unit>
<trans-unit id="mlang_labels_tabdescr" resname="mlang_labels_tabdescr">
<source>The Web&gt;Info module is focused on statistic information about pages. This includes statistics of pagehits and a changelog allowing browsing of page history changes. An overview of the number of records on each page as well as page settings presented in a classic tree structure is provided.</source>
</trans-unit>
<trans-unit id="mlang_tabs_tab" resname="mlang_tabs_tab">
<source>Info</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file t3:id="1415814792" source-language="en" datatype="plaintext" original="EXT:info/Resources/Private/Language/locallang_webinfo.xlf" date="2011-10-17T20:22:32Z" product-name="cms">
<header/>
<body>
<trans-unit id="page_title" resname="page_title">
<source>Pagetree overview</source>
</trans-unit>
<trans-unit id="page_sysnote" resname="page_sysnote">
<source>Internal notes</source>
</trans-unit>
<trans-unit id="pageInformation" resname="pageInformation">
<source>Page information</source>
</trans-unit>
<trans-unit id="pages_0" resname="pages_0">
<source>Basic settings</source>
</trans-unit>
<trans-unit id="pages_2" resname="pages_2">
<source>Cache and Age</source>
</trans-unit>
<trans-unit id="pages_1" resname="pages_1">
<source>Record overview</source>
</trans-unit>
<trans-unit id="stat_type_0" resname="stat_type_0">
<source>Page hits</source>
</trans-unit>
<trans-unit id="stat_type_1" resname="stat_type_1">
<source>Total hits</source>
</trans-unit>
<trans-unit id="stat_type_2" resname="stat_type_2">
<source>Hits in main sections</source>
</trans-unit>
<trans-unit id="stat_period" resname="stat_period">
<source>Statistics in the period %s back to %s</source>
</trans-unit>
<trans-unit id="pI_crUser" resname="pI_crUser">
<source>Created by</source>
</trans-unit>
<trans-unit id="pI_crDate" resname="pI_crDate">
<source>Created date</source>
</trans-unit>
<trans-unit id="pI_lastChange" resname="pI_lastChange">
<source>Last change</source>
</trans-unit>
<trans-unit id="pI_lastChangeContent" resname="pI_lastChangeContent">
<source>Last change, content</source>
</trans-unit>
<trans-unit id="hits_title" resname="hits_title">
<source>Hit Statistics</source>
</trans-unit>
<trans-unit id="lang_renderl10n_viewPage" resname="lang_renderl10n_viewPage">
<source>View page</source>
</trans-unit>
<trans-unit id="lang_title" resname="lang_title">
<source>Localization overview</source>
</trans-unit>
<trans-unit id="lang_renderl10n_editDefaultLanguagePage" resname="lang_renderl10n_editDefaultLanguagePage">
<source>Edit default language page properties</source>
</trans-unit>
<trans-unit id="lang_renderl10n_editLangOverlays" resname="lang_renderl10n_editLangOverlays">
<source>Edit all language overlay records</source>
</trans-unit>
<trans-unit id="lang_renderl10n_editPageProperties" resname="lang_renderl10n_editPageProperties">
<source>Edit all page properties</source>
</trans-unit>
<trans-unit id="lang_renderl10n_editPage" resname="lang_renderl10n_editPage">
<source>Edit page</source>
</trans-unit>
<trans-unit id="lang_renderl10n_editPageLang" resname="lang_renderl10n_editPageLang">
<source>Edit page translation</source>
</trans-unit>
<trans-unit id="lang_renderl10n_badThingThereAre" resname="lang_renderl10n_badThingThereAre">
<source>ERROR: there are two or more page overlay records for this language! Only one is allowed!</source>
</trans-unit>
<trans-unit id="lang_renderl10n_editLanguageOverlayRecord" resname="lang_renderl10n_editLanguageOverlayRecord">
<source>Edit language overlay record</source>
</trans-unit>
<trans-unit id="lang_renderl10n_page" resname="lang_renderl10n_page">
<source>Page</source>
</trans-unit>
<trans-unit id="lang_renderl10n_default" resname="lang_renderl10n_default">
<source>Default</source>
</trans-unit>
<trans-unit id="lang_getlangsta_createNewTranslationHeaders" resname="lang_getlangsta_createNewTranslationHeaders">
<source>Create new translation headers</source>
</trans-unit>
<trans-unit id="lang_renderl10n_CEcount" resname="lang_renderl10n_CEcount">
<source>Content Element Count</source>
</trans-unit>
</body>
</file>
</xliff>
@@ -0,0 +1,8 @@
<f:if condition="{editIcon}">
<a href="{editIcon -> f:format.raw()}" title="{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:{editTitle}')}" class="btn btn-default">
<core:icon identifier="actions-document-open" />
<f:if condition="{editAll}">
<f:translate key="LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:editTSconfig_all" />
</f:if>
</a>
</f:if>
@@ -0,0 +1,9 @@
<div class="form-inline form-inline-spaced">
<f:format.raw>{dropdownMenu}</f:format.raw>
<div class="checkbox">
<label for="checkTsconf_alphaSort">
<f:format.raw>{alphaSort}</f:format.raw>
{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:sort_alphabetic')}
</label>
</div>
</div>
@@ -0,0 +1,35 @@
<h1>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:tsconf_title')}</h1>
<f:if condition="{csh}">
<span class="btn btn-default btn-sm"><f:format.raw>{csh}</f:format.raw></span>
</f:if>
<f:render partial="PageTsConfig/Menu" arguments="{_all}"/>
<f:if condition="{tsconfParts99}">
<f:then>
<f:for each="{lines}" as="line">
<div class="panel panel-default">
<div class="panel-heading">
<f:if condition="{line.defaultPageTSconfig}">
<f:then>
<f:translate key="LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:editTSconfig_default" />
</f:then>
<f:else>
<f:format.raw>{line.title}</f:format.raw>
</f:else>
</f:if>
</div>
<div class="panel-body">
<f:if condition="{line.content -> f:format.stripTags() -> f:spaceless()}">
<f:format.raw>{line.content}</f:format.raw>
</f:if>
<f:render partial="PageTsConfig/EditIcon" arguments="{editIcon: line.editIcon, editTitle: line.editTitle}" />
</div>
</div>
</f:for>
<f:render partial="PageTsConfig/EditIcon" arguments="{editIcon: editIcon, editTitle: editTitle, editAll: 1}" />
</f:then>
<f:else>
<div class="nowrap">
<f:format.raw>{tree}</f:format.raw>
</div>
</f:else>
</f:if>
@@ -0,0 +1,25 @@
<div class="nowrap">
<f:if condition="{overviewOfPagesUsingTSConfig}">
<f:then>
<div class="table-fit">
<table class="table table-striped table-hover" id="tsconfig-overview">
<thead>
<tr>
<th>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:pagetitle')}</th>
<th>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:included_tsconfig_files')}</th>
<th>{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:written_tsconfig_lines')}</th>
</tr>
</thead>
<tbody>
<f:for each="{overviewOfPagesUsingTSConfig}" as="line">
<f:render partial="PageTsConfig/PageZeroTableRow" arguments="{line: line}" />
</f:for>
</tbody>
</table>
</div>
</f:then>
<f:else>
<f:be.infobox message="{f:translate(key: 'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:tsconf_noPageTSconfig')}" state="-1" />
</f:else>
</f:if>
</div>
@@ -0,0 +1,18 @@
<tr>
<td class="nowrap" style="padding-left: {line.padding}px">
<f:if condition="{line.link}">
<f:then>
<a href="{line.link}" title="{line.title}">
<f:format.raw>{line.icon}</f:format.raw>
<f:format.raw>{line.pageTitle}</f:format.raw>
</a>
</f:then>
<f:else>
<f:format.raw>{line.icon}</f:format.raw>
<f:format.raw>{line.pageTitle}</f:format.raw>
</f:else>
</f:if>
</td>
<td>{line.includedFiles}</td>
<td>{line.lines}</td>
</tr>
@@ -0,0 +1,3 @@
<form action="{moduleName}" method="post" id="InfoModuleController" name="webinfoForm" class="form-inline form-inline-spaced">
<f:format.raw>{functionMenuModuleContent}</f:format.raw>
</form>
@@ -0,0 +1,8 @@
<f:if condition="{pageZero}">
<f:then>
<f:render partial="PageTsConfig/PageZero" arguments="{_all}" />
</f:then>
<f:else>
<f:render partial="PageTsConfig/Page" arguments="{_all}" />
</f:else>
</f:if>
Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

@@ -0,0 +1 @@
<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title>module-info</title><g fill="none" fill-rule="evenodd"><path d="M0 0h64v64H0z" fill="#6DAAE0"/><path d="M39.95 43.5c0-.8-.7-1.5-1.5-1.5H36V29.5c0-.8-.7-1.5-1.5-1.5h-8.01c-.8 0-1.5.7-1.5 1.5v3.004c0 .8.7 1.5 1.5 1.5H28V42h-2.5c-.8 0-1.5.7-1.5 1.5l-.1 3.014c0 .8.7 1.5 1.5 1.5h13.05c.8 0 1.5-.7 1.5-1.5l.1-3.014h-.1zM34.52 16H29.48c-.79 0-1.481.691-1.481 1.481v5.038c0 .79.691 1.481 1.481 1.481h5.038c.79 0 1.481-.691 1.481-1.481V17.48c0-.79-.691-1.481-1.481-1.481z" fill="#FFF"/></g></svg>

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,13 @@
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
define(["require","exports","jquery"],(function(t,e,n){"use strict";return new(function(){function t(){this.registerEvents()}return t.prototype.registerEvents=function(){n('input[type="checkbox"][data-lang]').on("change",this.toggleNewButton)},t.prototype.toggleNewButton=function(t){var e=n(t.currentTarget),a=parseInt(e.data("lang"),10),r=n(".t3js-language-new-"+a),o=n('input[type="checkbox"][data-lang="'+a+'"]:checked'),i=[];o.each((function(t,e){i.push("cmd[pages]["+e.dataset.uid+"][localize]="+a)}));var u=r.data("editUrl")+"&"+i.join("&");r.attr("href",u),r.toggleClass("disabled",0===o.length)},t}())}));
+43
View File
@@ -0,0 +1,43 @@
{
"name": "typo3/cms-info",
"type": "typo3-cms-framework",
"description": "Shows various infos",
"homepage": "https://typo3.org",
"license": ["GPL-2.0-or-later"],
"authors": [{
"name": "TYPO3 Core Team",
"email": "typo3cms@typo3.org",
"role": "Developer"
}],
"config": {
"sort-packages": true
},
"require": {
"typo3/cms-core": "9.5.31"
},
"conflict": {
"typo3/cms": "*"
},
"replace": {
"typo3/cms-info-pagetsconfig": "*"
},
"extra": {
"typo3/cms": {
"Package": {
"partOfFactoryDefault": true
},
"extension-key": "info"
},
"typo3/class-alias-loader": {
"always-add-alias-loader": true,
"class-alias-maps": [
"Migrations/Code/ClassAliasMap.php"
]
}
},
"autoload": {
"psr-4": {
"TYPO3\\CMS\\Info\\": "Classes/"
}
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
$EM_CONF[$_EXTKEY] = [
'title' => 'Web>Info',
'description' => 'Shows various infos',
'category' => 'module',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
'clearCacheOnLoad' => 0,
'author' => 'TYPO3 Core Team',
'author_email' => 'typo3cms@typo3.org',
'author_company' => '',
'version' => '9.5.31',
'constraints' => [
'depends' => [
'typo3' => '9.5.31',
],
'conflicts' => [],
'suggests' => [],
],
];
+37
View File
@@ -0,0 +1,37 @@
<?php
defined('TYPO3_MODE') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'web',
'info',
'',
'',
[
'routeTarget' => \TYPO3\CMS\Info\Controller\InfoModuleController::class . '::mainAction',
'access' => 'user,group',
'name' => 'web_info',
'icon' => 'EXT:info/Resources/Public/Icons/module-info.svg',
'labels' => 'LLL:EXT:info/Resources/Private/Language/locallang_mod_web_info.xlf'
]
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_info', 'EXT:info/Resources/Private/Language/locallang_csh_web_info.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_infotsconfig', 'EXT:info/Resources/Private/Language/locallang_csh_tsconfigInfo.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
'web_info',
\TYPO3\CMS\Info\Controller\PageInformationController::class,
null,
'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:mod_tx_cms_webinfo_page'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
'web_info',
\TYPO3\CMS\Info\Controller\TranslationStatusController::class,
null,
'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:mod_tx_cms_webinfo_lang'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
'web_info',
\TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController::class,
null,
'LLL:EXT:info/Resources/Private/Language/InfoPageTsConfig.xlf:mod_pagetsconfig'
);