From 9cd56105fba05862e5b54c1b44d858499c8bbf74 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Fri, 28 Apr 2017 11:33:23 +0200 Subject: [PATCH] [TASK] Streamline ext_localconf.php and ext_tables.php The goal is to minimize TYPO3_MODE usage in ext_localconf and ext_tables and provide a clear process for extension developers where to put what. This extension streamlines the whole usage within all system extensions, and documents the expected behaviour of all third-party extensions, which will also be included in docs.typo3.org. Resolves: #82692 Releases: master Change-Id: Id83ff0dfc6198564443f2f42e273bcd4f6f25e3e Reviewed-on: https://review.typo3.org/52533 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org> --- typo3/sysext/about/ext_tables.php | 31 +- .../Security/CategoryPermissionsAspect.php | 7 +- typo3/sysext/backend/ext_localconf.php | 51 ++-- typo3/sysext/backend/ext_tables.php | 31 +- typo3/sysext/belog/ext_localconf.php | 16 +- typo3/sysext/belog/ext_tables.php | 49 ++-- typo3/sysext/beuser/ext_localconf.php | 2 +- typo3/sysext/beuser/ext_tables.php | 68 ++--- ...tant-82692-GuidelinesForExtensionFiles.rst | 67 +++++ .../irre_tutorial/ext_localconf.php | 2 +- typo3/sysext/core/ext_localconf.php | 28 +- typo3/sysext/core/ext_tables.php | 6 +- typo3/sysext/documentation/ext_localconf.php | 2 + typo3/sysext/documentation/ext_tables.php | 62 ++-- .../TCA/Overrides/sys_template.php | 5 + .../Extensions/blog_example/ext_localconf.php | 4 +- .../Extensions/blog_example/ext_tables.php | 3 - typo3/sysext/extbase/ext_localconf.php | 9 + typo3/sysext/extbase/ext_tables.php | 11 - .../sysext/extensionmanager/ext_localconf.php | 51 ++-- typo3/sysext/extensionmanager/ext_tables.php | 48 ++- typo3/sysext/feedit/ext_localconf.php | 14 +- typo3/sysext/felogin/ext_localconf.php | 24 +- typo3/sysext/filelist/ext_localconf.php | 4 + typo3/sysext/filelist/ext_tables.php | 37 +-- typo3/sysext/form/ext_localconf.php | 133 ++++----- typo3/sysext/form/ext_tables.php | 38 ++- .../Aspect/FileMetadataOverlayAspect.php | 4 + typo3/sysext/frontend/ext_localconf.php | 14 +- typo3/sysext/frontend/ext_tables.php | 14 +- typo3/sysext/impexp/ext_localconf.php | 6 + typo3/sysext/impexp/ext_tables.php | 11 +- typo3/sysext/indexed_search/ext_localconf.php | 24 +- typo3/sysext/indexed_search/ext_tables.php | 30 +- typo3/sysext/info/ext_tables.php | 68 +++-- typo3/sysext/install/ext_localconf.php | 9 + typo3/sysext/install/ext_tables.php | 115 ++++---- typo3/sysext/lang/ext_tables.php | 33 +-- typo3/sysext/linkvalidator/ext_tables.php | 17 +- typo3/sysext/lowlevel/ext_tables.php | 58 ++-- typo3/sysext/opendocs/ext_localconf.php | 6 +- typo3/sysext/opendocs/ext_tables.php | 7 - typo3/sysext/recordlist/ext_localconf.php | 5 + typo3/sysext/recordlist/ext_tables.php | 33 +-- typo3/sysext/recycler/ext_tables.php | 30 +- typo3/sysext/reports/ext_localconf.php | 25 ++ typo3/sysext/reports/ext_tables.php | 54 +--- typo3/sysext/rte_ckeditor/ext_localconf.php | 2 +- typo3/sysext/scheduler/ext_tables.php | 40 ++- typo3/sysext/setup/ext_tables.php | 274 +++++++++--------- typo3/sysext/sys_action/ext_localconf.php | 9 +- typo3/sysext/sys_action/ext_tables.php | 9 +- typo3/sysext/t3editor/ext_localconf.php | 12 +- typo3/sysext/taskcenter/ext_tables.php | 28 +- typo3/sysext/tstemplate/ext_tables.php | 76 +++-- typo3/sysext/version/ext_localconf.php | 12 +- typo3/sysext/viewpage/ext_tables.php | 32 +- typo3/sysext/workspaces/ext_localconf.php | 21 +- typo3/sysext/workspaces/ext_tables.php | 39 ++- 59 files changed, 957 insertions(+), 963 deletions(-) create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Important-82692-GuidelinesForExtensionFiles.rst create mode 100644 typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/sys_template.php delete mode 100644 typo3/sysext/extbase/ext_tables.php delete mode 100644 typo3/sysext/opendocs/ext_tables.php diff --git a/typo3/sysext/about/ext_tables.php b/typo3/sysext/about/ext_tables.php index 9930cff48cbb..5d0bd6cdc114 100644 --- a/typo3/sysext/about/ext_tables.php +++ b/typo3/sysext/about/ext_tables.php @@ -1,20 +1,17 @@ <?php defined('TYPO3_MODE') or die(); -// Avoid that this block is loaded in frontend or within upgrade wizards -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.About', - 'help', - 'about', - 'top', - [ - 'About' => 'index' - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:about/Resources/Public/Icons/module-about.svg', - 'labels' => 'LLL:EXT:about/Resources/Private/Language/Modules/about.xlf' - ] - ); -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.About', + 'help', + 'about', + 'top', + [ + 'About' => 'index' + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:about/Resources/Public/Icons/module-about.svg', + 'labels' => 'LLL:EXT:about/Resources/Private/Language/Modules/about.xlf' + ] +); diff --git a/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php b/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php index 65648ba40b04..06d299e913d8 100644 --- a/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php +++ b/typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php @@ -54,7 +54,12 @@ class CategoryPermissionsAspect */ public function addUserPermissionsToCategoryTreeData(DatabaseTreeDataProvider $dataProvider, $treeData) { - if ((TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE) && !$this->backendUserAuthentication->isAdmin() && $dataProvider->getTableName() === $this->categoryTableName) { + // Only evaluate this in the backend + if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE)) { + return; + } + + if (!$this->backendUserAuthentication->isAdmin() && $dataProvider->getTableName() === $this->categoryTableName) { // Get User permissions related to category $categoryMountPoints = $this->backendUserAuthentication->getCategoryMountPoints(); diff --git a/typo3/sysext/backend/ext_localconf.php b/typo3/sysext/backend/ext_localconf.php index 65af364af005..bf35d66c6dc5 100644 --- a/typo3/sysext/backend/ext_localconf.php +++ b/typo3/sysext/backend/ext_localconf.php @@ -9,31 +9,29 @@ defined('TYPO3_MODE') or die(); 'addUserPermissionsToCategoryTreeData' ); -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433106] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433107] = \TYPO3\CMS\Backend\Backend\ToolbarItems\HelpToolbarItem::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433108] = \TYPO3\CMS\Backend\Backend\ToolbarItems\LiveSearchToolbarItem::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433109] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ShortcutToolbarItem::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433110] = \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433111] = \TYPO3\CMS\Backend\Backend\ToolbarItems\UserToolbarItem::class; - - $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['loginProviders'][1433416747] = [ - 'provider' => \TYPO3\CMS\Backend\LoginProvider\UsernamePasswordLoginProvider::class, - 'sorting' => 50, - 'icon-class' => 'fa-key', - 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:login.link' - ]; - - $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['avatarProviders']['defaultAvatarProvider'] = [ - 'provider' => \TYPO3\CMS\Backend\Backend\Avatar\DefaultAvatarProvider::class - ]; - - $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1460321142] = [ - 'nodeName' => 'belayoutwizard', - 'priority' => 40, - 'class' => \TYPO3\CMS\Backend\View\Wizard\Element\BackendLayoutWizardElement::class, - ]; -} +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433106] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433107] = \TYPO3\CMS\Backend\Backend\ToolbarItems\HelpToolbarItem::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433108] = \TYPO3\CMS\Backend\Backend\ToolbarItems\LiveSearchToolbarItem::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433109] = \TYPO3\CMS\Backend\Backend\ToolbarItems\ShortcutToolbarItem::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433110] = \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433111] = \TYPO3\CMS\Backend\Backend\ToolbarItems\UserToolbarItem::class; + +$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['loginProviders'][1433416747] = [ + 'provider' => \TYPO3\CMS\Backend\LoginProvider\UsernamePasswordLoginProvider::class, + 'sorting' => 50, + 'icon-class' => 'fa-key', + 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:login.link' +]; + +$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['avatarProviders']['defaultAvatarProvider'] = [ + 'provider' => \TYPO3\CMS\Backend\Backend\Avatar\DefaultAvatarProvider::class +]; + +$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1460321142] = [ + 'nodeName' => 'belayoutwizard', + 'priority' => 40, + 'class' => \TYPO3\CMS\Backend\View\Wizard\Element\BackendLayoutWizardElement::class, +]; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default'] = \TYPO3\CMS\Core\FrontendEditing\FrontendEditingController::class; @@ -51,3 +49,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect']['TYPO3.Components.PageTre $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect']['TYPO3.Components.PageTree.Commands'] = [ 'callbackClass' => \TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeCommands::class, ]; + +// Register BackendLayoutDataProvider for PageTs +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider']['pagets'] = \TYPO3\CMS\Backend\Provider\PageTsBackendLayoutDataProvider::class; diff --git a/typo3/sysext/backend/ext_tables.php b/typo3/sysext/backend/ext_tables.php index 18fa964316de..c23146803e9c 100644 --- a/typo3/sysext/backend/ext_tables.php +++ b/typo3/sysext/backend/ext_tables.php @@ -9,24 +9,19 @@ $GLOBALS['TBE_STYLES']['skins']['backend'] = [ ] ]; -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'web', - 'layout', - 'top', - '', - [ - 'routeTarget' => \TYPO3\CMS\Backend\Controller\PageLayoutController::class . '::mainAction', - 'access' => 'user,group', - 'name' => 'web_layout', - 'icon' => 'EXT:backend/Resources/Public/Icons/module-page.svg', - 'labels' => 'LLL:EXT:backend/Resources/Private/Language/locallang_mod.xlf' - ] - ); - - // Register BackendLayoutDataProvider for PageTs - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['BackendLayoutDataProvider']['pagets'] = \TYPO3\CMS\Backend\Provider\PageTsBackendLayoutDataProvider::class; -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'web', + 'layout', + 'top', + '', + [ + 'routeTarget' => \TYPO3\CMS\Backend\Controller\PageLayoutController::class . '::mainAction', + 'access' => 'user,group', + 'name' => 'web_layout', + 'icon' => 'EXT:backend/Resources/Public/Icons/module-page.svg', + 'labels' => 'LLL:EXT:backend/Resources/Private/Language/locallang_mod.xlf' + ] +); // "Sort sub pages" csh \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( diff --git a/typo3/sysext/belog/ext_localconf.php b/typo3/sysext/belog/ext_localconf.php index 24696b939d60..8040bedc86be 100644 --- a/typo3/sysext/belog/ext_localconf.php +++ b/typo3/sysext/belog/ext_localconf.php @@ -1,12 +1,10 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class) - ->connect( - \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem::class, - 'loadMessages', - \TYPO3\CMS\Belog\Controller\SystemInformationController::class, - 'appendMessage' - ); -} +\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class) + ->connect( + \TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem::class, + 'loadMessages', + \TYPO3\CMS\Belog\Controller\SystemInformationController::class, + 'appendMessage' + ); diff --git a/typo3/sysext/belog/ext_tables.php b/typo3/sysext/belog/ext_tables.php index 2324d442efe3..b74dd943e650 100644 --- a/typo3/sysext/belog/ext_tables.php +++ b/typo3/sysext/belog/ext_tables.php @@ -1,30 +1,27 @@ <?php defined('TYPO3_MODE') or die(); -// Register backend modules, but not in frontend or within upgrade wizards -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - // Module Web->Info->Log - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( - 'web_info', - \TYPO3\CMS\Belog\Module\BackendLogModuleBootstrap::class, - null, - 'Log' - ); +// Module Web->Info->Log +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( + 'web_info', + \TYPO3\CMS\Belog\Module\BackendLogModuleBootstrap::class, + null, + 'Log' +); - // Module Tools->Log - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Belog', - 'system', - 'log', - '', - [ - 'Tools' => 'index,deleteMessage', - 'WebInfo' => 'index', - ], - [ - 'access' => 'admin', - 'icon' => 'EXT:belog/Resources/Public/Icons/module-belog.svg', - 'labels' => 'LLL:EXT:belog/Resources/Private/Language/locallang_mod.xlf', - ] - ); -} +// Module Tools->Log +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Belog', + 'system', + 'log', + '', + [ + 'Tools' => 'index,deleteMessage', + 'WebInfo' => 'index', + ], + [ + 'access' => 'admin', + 'icon' => 'EXT:belog/Resources/Public/Icons/module-belog.svg', + 'labels' => 'LLL:EXT:belog/Resources/Private/Language/locallang_mod.xlf', + ] +); diff --git a/typo3/sysext/beuser/ext_localconf.php b/typo3/sysext/beuser/ext_localconf.php index eebb392df204..fdc2b0815bdf 100644 --- a/typo3/sysext/beuser/ext_localconf.php +++ b/typo3/sysext/beuser/ext_localconf.php @@ -2,5 +2,5 @@ defined('TYPO3_MODE') or die(); $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][] = \TYPO3\CMS\Beuser\Hook\SwitchBackUserHook::class . '->switchBack'; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Beuser\Hook\BackendControllerHook::class . '->addJavaScript'; +$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418730] = \TYPO3\CMS\Beuser\ContextMenu\ItemProvider::class; diff --git a/typo3/sysext/beuser/ext_tables.php b/typo3/sysext/beuser/ext_tables.php index 3fb949c76167..abf606bb9868 100644 --- a/typo3/sysext/beuser/ext_tables.php +++ b/typo3/sysext/beuser/ext_tables.php @@ -1,40 +1,36 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - // Module System > Backend Users - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Beuser', - 'system', - 'tx_Beuser', - 'top', - [ - 'BackendUser' => 'index, addToCompareList, removeFromCompareList, compare, online, terminateBackendUserSession', - 'BackendUserGroup' => 'index' - ], - [ - 'access' => 'admin', - 'icon' => 'EXT:beuser/Resources/Public/Icons/module-beuser.svg', - 'labels' => 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod.xlf' - ] - ); +// Module System > Backend Users +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Beuser', + 'system', + 'tx_Beuser', + 'top', + [ + 'BackendUser' => 'index, addToCompareList, removeFromCompareList, compare, online, terminateBackendUserSession', + 'BackendUserGroup' => 'index' + ], + [ + 'access' => 'admin', + 'icon' => 'EXT:beuser/Resources/Public/Icons/module-beuser.svg', + 'labels' => 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod.xlf' + ] +); - // Module System > Access - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Beuser', - 'system', - 'tx_Permission', - 'top', - [ - 'Permission' => 'index, edit, update' - ], - [ - 'access' => 'admin', - 'icon' => 'EXT:beuser/Resources/Public/Icons/module-permission.svg', - 'labels' => 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf', - 'navigationComponentId' => 'typo3-pagetree' - ] - ); - - $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418730] = \TYPO3\CMS\Beuser\ContextMenu\ItemProvider::class; -} +// Module System > Access +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Beuser', + 'system', + 'tx_Permission', + 'top', + [ + 'Permission' => 'index, edit, update' + ], + [ + 'access' => 'admin', + 'icon' => 'EXT:beuser/Resources/Public/Icons/module-permission.svg', + 'labels' => 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf', + 'navigationComponentId' => 'typo3-pagetree' + ] +); diff --git a/typo3/sysext/core/Documentation/Changelog/master/Important-82692-GuidelinesForExtensionFiles.rst b/typo3/sysext/core/Documentation/Changelog/master/Important-82692-GuidelinesForExtensionFiles.rst new file mode 100644 index 000000000000..28bae498921e --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Important-82692-GuidelinesForExtensionFiles.rst @@ -0,0 +1,67 @@ +.. include:: ../../Includes.txt + +======================================================================= +Important: #82692 - Guidelines for ext_localconf.php and ext_tables.php +======================================================================= + +See :issue:`82692` + +Description +=========== + +Each extension has two easy ways to extend TYPO3 Core, as the TYPO3 Bootstrap loads all active +extensions and include the following files of all extensions, depending on the loading order +of the extensions' dependencies located in `ext_emconf.php`: + +1. ext_localconf.php +This file is included at every request of TYPO3 (Frontend, Backend, CLI) at a very early stage, just +after the global configuration is loaded and the Package Manager knows which extensions are active. + +2. ext_tables.php +This file is only included when +* a TYPO3 Backend or CLI request is happening +* or the TYPO3 Frontend is called and a valid Backend User is authenticated + +This file gets usually included later within the request and after TCA information is loaded, +and a Backend User is authenticated as well. + +These are the typical functionalities that extension authors should place within `ext_localconf.php` + +* Registering hooks or any simple array assignments to :php:`$TYPO3_CONF_VARS` options +* Registering additional Request Handlers within the Bootstrap +* Adding any PageTSconfig or Default TypoScript via `ExtensionManagementUtility` APIs +* Registering Extbase Command Controllers +* Registering Scheduler Tasks +* Adding reports to the reports module +* Adding slots to signals via Extbase's SignalSlotDispatcher +* Registering Icons to the IconRegistry +* Registering Services via the Service API + +These are the typical functionalities should be placed inside `ext_tables.php` + +* Registering of Backend modules or Backend module functions +* Adding Context-Sensitive-Help docs via ExtensionManagementUtility API +* Adding TCA descriptions (via `ExtensionManagementUtility::addLLrefForTCAdescr()`) +* Adding table options via `ExtensionManagementUtility::allowTableOnStandardPages` +* Assignments to the global configuration arrays `$TBE_STYLES` and `$PAGES_TYPES` +* Adding new fields to User Settings ("Setup" Extension) + +Additionally, it is possible to extend TYPO3 in a lot of different ways (adding TCA, Backend Routes, +Symfony Console Commands etc) which do not need to touch these files. + +It is heavily recommended to AVOID any checks on `TYPO3_MODE` or `TYPO3_REQUESTTYPE` constants +(e.g. `if(TYPO3_MODE === 'BE')`) within these files as it limits the functionality to cache the +whole systems' configuration. Any extension author should remove the checks if not explicitly +necessary, and re-evaluate if these context-depending checks could go inside the hooks / caller +function directly. + +Additionally, it is recommend to use the extension name (e.g. "tt_address") instead of `$_EXTKEY` +within the two configuration files as this variable will be removed in the future. This also applies +to `$_EXTCONF`. + +However, due to limitations to TER, the `$_EXTKEY` option should be kept within an extensions +`ext_emconf.php`. + +See any system extension for best practice on this behaviour. + +.. index:: PHP-API \ No newline at end of file diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/ext_localconf.php b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/ext_localconf.php index de318875e8c7..3d3cce76390b 100644 --- a/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/ext_localconf.php +++ b/typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/ext_localconf.php @@ -2,7 +2,7 @@ defined('TYPO3_MODE') or die(); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'OliverHader.' . $_EXTKEY, + 'OliverHader.IrreTutorial', 'Irre', [ 'Queue' => 'index', diff --git a/typo3/sysext/core/ext_localconf.php b/typo3/sysext/core/ext_localconf.php index bd929ad92014..db260671d050 100644 --- a/typo3/sysext/core/ext_localconf.php +++ b/typo3/sysext/core/ext_localconf.php @@ -5,6 +5,14 @@ defined('TYPO3_MODE') or die(); /** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */ $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class); +// PACKAGE MANAGEMENT +$signalSlotDispatcher->connect( + 'PackageManagement', + 'packagesMayHaveChanged', + \TYPO3\CMS\Core\Package\PackageManager::class, + 'scanAvailablePackages' +); + // FAL security checks for backend users $signalSlotDispatcher->connect( \TYPO3\CMS\Core\Resource\ResourceFactory::class, @@ -13,21 +21,11 @@ $signalSlotDispatcher->connect( 'addUserPermissionsToStorage' ); -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Hooks\BackendUserGroupIntegrityCheck::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class . '->isAllowedToShowEditForm'; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['checkAccess'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class . '->isAllowedToShowEditForm'; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class; - - // PACKAGE MANAGEMENT - $signalSlotDispatcher->connect( - 'PackageManagement', - 'packagesMayHaveChanged', - \TYPO3\CMS\Core\Package\PackageManager::class, - 'scanAvailablePackages' - ); -} +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Hooks\BackendUserGroupIntegrityCheck::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class . '->isAllowedToShowEditForm'; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['checkAccess'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class . '->isAllowedToShowEditForm'; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class; $signalSlotDispatcher->connect( \TYPO3\CMS\Core\Resource\ResourceStorage::class, diff --git a/typo3/sysext/core/ext_tables.php b/typo3/sysext/core/ext_tables.php index 07bec5d1f6d3..aecd9b88265f 100644 --- a/typo3/sysext/core/ext_tables.php +++ b/typo3/sysext/core/ext_tables.php @@ -106,7 +106,5 @@ $GLOBALS['TBE_STYLES'] = []; // General Core \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_csh_corebe', 'EXT:core/Resources/Private/Language/locallang_csh_corebe.xlf'); -if (TYPO3_MODE === 'BE' || TYPO3_MODE === 'FE' && isset($GLOBALS['BE_USER'])) { - // extJS theme - $GLOBALS['TBE_STYLES']['extJS']['theme'] = 'EXT:core/Resources/Public/ExtJs/xtheme-t3skin.css'; -} +// extJS theme +$GLOBALS['TBE_STYLES']['extJS']['theme'] = 'EXT:core/Resources/Public/ExtJs/xtheme-t3skin.css'; diff --git a/typo3/sysext/documentation/ext_localconf.php b/typo3/sysext/documentation/ext_localconf.php index 6ef8e4d5d2f6..6e66735cf348 100644 --- a/typo3/sysext/documentation/ext_localconf.php +++ b/typo3/sysext/documentation/ext_localconf.php @@ -9,3 +9,5 @@ defined('TYPO3_MODE') or die(); \TYPO3\CMS\Documentation\Slots\ExtensionManager::class, 'processActions' ); + +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook']['cshmanual'] = \TYPO3\CMS\Documentation\Service\JavaScriptService::class . '->addJavaScript'; diff --git a/typo3/sysext/documentation/ext_tables.php b/typo3/sysext/documentation/ext_tables.php index 4ac5d81564a9..fc6133a47792 100644 --- a/typo3/sysext/documentation/ext_tables.php +++ b/typo3/sysext/documentation/ext_tables.php @@ -1,37 +1,33 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - // Registers a Backend Module - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Documentation', - 'help', - 'documentation', - 'top', - [ - 'Document' => 'list, download, fetch', - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:documentation/Resources/Public/Icons/module-documentation.svg', - 'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod.xlf', - ] - ); +// Registers a Backend Module +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Documentation', + 'help', + 'documentation', + 'top', + [ + 'Document' => 'list, download, fetch', + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:documentation/Resources/Public/Icons/module-documentation.svg', + 'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod.xlf', + ] +); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Documentation', - 'help', - 'cshmanual', - 'top', - [ - 'Help' => 'index,all,detail', - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:documentation/Resources/Public/Icons/module-cshmanual.svg', - 'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod_help_cshmanual.xlf', - ] - ); - - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['preStartPageHook']['cshmanual'] = \TYPO3\CMS\Documentation\Service\JavaScriptService::class . '->addJavaScript'; -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Documentation', + 'help', + 'cshmanual', + 'top', + [ + 'Help' => 'index,all,detail', + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:documentation/Resources/Public/Icons/module-cshmanual.svg', + 'labels' => 'LLL:EXT:documentation/Resources/Private/Language/locallang_mod_help_cshmanual.xlf', + ] +); diff --git a/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/sys_template.php b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 000000000000..820e49539641 --- /dev/null +++ b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,5 @@ +<?php +defined('TYPO3_MODE') or die(); + +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('blog_example', 'Configuration/TypoScript', 'BlogExample setup'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('blog_example', 'Configuration/TypoScript/DefaultStyles', 'BlogExample CSS Styles (optional)'); diff --git a/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_localconf.php b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_localconf.php index 3248fbbd8c75..6d5907c35ec0 100644 --- a/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_localconf.php +++ b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_localconf.php @@ -2,7 +2,7 @@ defined('TYPO3_MODE') or die(); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'ExtbaseTeam.' . $_EXTKEY, + 'ExtbaseTeam.BlogExample', 'Blogs', [ 'Blog' => 'list', @@ -10,7 +10,7 @@ defined('TYPO3_MODE') or die(); [] ); \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( - 'ExtbaseTeam.' . $_EXTKEY, + 'ExtbaseTeam.BlogExample', 'Content', [ 'Content' => 'list', diff --git a/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php index 7ae11b2fdaf1..9eb5ba412de1 100644 --- a/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php +++ b/typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/ext_tables.php @@ -6,9 +6,6 @@ defined('TYPO3_MODE') or die(); */ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_BlogExampleTxBlogexampleM1', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh.xml'); -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'BlogExample setup'); -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/DefaultStyles', 'BlogExample CSS Styles (optional)'); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Blogs', 'Blog listing'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages( diff --git a/typo3/sysext/extbase/ext_localconf.php b/typo3/sysext/extbase/ext_localconf.php index 262a32e8f827..210654901aee 100644 --- a/typo3/sysext/extbase/ext_localconf.php +++ b/typo3/sysext/extbase/ext_localconf.php @@ -33,3 +33,12 @@ unset($extbaseObjectContainer); // register help command $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = \TYPO3\CMS\Extbase\Command\HelpCommandController::class; + +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Extbase\Scheduler\Task::class] = [ + 'extension' => 'extbase', + 'title' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:task.name', + 'description' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:task.description', + 'additionalFields' => \TYPO3\CMS\Extbase\Scheduler\FieldProvider::class +]; + +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkFlexFormValue'][] = \TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue::class; diff --git a/typo3/sysext/extbase/ext_tables.php b/typo3/sysext/extbase/ext_tables.php deleted file mode 100644 index 7d026455b803..000000000000 --- a/typo3/sysext/extbase/ext_tables.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -defined('TYPO3_MODE') or die(); - -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Extbase\Scheduler\Task::class] = [ - 'extension' => 'extbase', - 'title' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:task.name', - 'description' => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xlf:task.description', - 'additionalFields' => \TYPO3\CMS\Extbase\Scheduler\FieldProvider::class -]; - -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkFlexFormValue'][] = \TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue::class; diff --git a/typo3/sysext/extensionmanager/ext_localconf.php b/typo3/sysext/extensionmanager/ext_localconf.php index 4e75c436be51..e7242e2151c4 100644 --- a/typo3/sysext/extensionmanager/ext_localconf.php +++ b/typo3/sysext/extensionmanager/ext_localconf.php @@ -12,30 +12,33 @@ if (empty($extConf['offlineMode'])) { ]; } -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = \TYPO3\CMS\Extensionmanager\Command\ExtensionCommandController::class; - if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class); - $signalSlotDispatcher->connect( - \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, - 'willInstallExtensions', - \TYPO3\CMS\Core\Package\PackageManager::class, - 'scanAvailablePackages' - ); - $signalSlotDispatcher->connect( - \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, - 'tablesDefinitionIsBeingBuilt', - \TYPO3\CMS\Core\Cache\DatabaseSchemaService::class, - 'addCachingFrameworkRequiredDatabaseSchemaForInstallUtility' - ); - $signalSlotDispatcher->connect( - \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, - 'tablesDefinitionIsBeingBuilt', - \TYPO3\CMS\Core\Category\CategoryRegistry::class, - 'addExtensionCategoryDatabaseSchemaToTablesDefinition' - ); - unset($signalSlotDispatcher); - } +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = \TYPO3\CMS\Extensionmanager\Command\ExtensionCommandController::class; + +if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE) { + $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class); + $signalSlotDispatcher->connect( + \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class, + 'willInstallExtensions', + \TYPO3\CMS\Core\Package\PackageManager::class, + 'scanAvailablePackages' + ); + $signalSlotDispatcher->connect( + \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, + 'tablesDefinitionIsBeingBuilt', + \TYPO3\CMS\Core\Cache\DatabaseSchemaService::class, + 'addCachingFrameworkRequiredDatabaseSchemaForInstallUtility' + ); + $signalSlotDispatcher->connect( + \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class, + 'tablesDefinitionIsBeingBuilt', + \TYPO3\CMS\Core\Category\CategoryRegistry::class, + 'addExtensionCategoryDatabaseSchemaToTablesDefinition' + ); + unset($signalSlotDispatcher); } unset($extConf); + +// Register extension status report system +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['Extension Manager'][] = + \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class; diff --git a/typo3/sysext/extensionmanager/ext_tables.php b/typo3/sysext/extensionmanager/ext_tables.php index 256b4aacbb55..3ef9cc184e47 100644 --- a/typo3/sysext/extensionmanager/ext_tables.php +++ b/typo3/sysext/extensionmanager/ext_tables.php @@ -1,30 +1,24 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Extensionmanager', - 'tools', - 'extensionmanager', - '', - [ - 'List' => 'index,unresolvedDependencies,ter,showAllVersions,distributions', - 'Action' => 'toggleExtensionInstallationState,installExtensionWithoutSystemDependencyCheck,removeExtension,downloadExtensionZip,reloadExtensionData', - 'Configuration' => 'showConfigurationForm,save,saveAndClose', - 'Download' => 'checkDependencies,installFromTer,installExtensionWithoutSystemDependencyCheck,installDistribution,updateExtension,updateCommentForUpdatableVersions', - 'UpdateScript' => 'show', - 'UpdateFromTer' => 'updateExtensionListFromTer', - 'UploadExtensionFile' => 'form,extract', - 'Distribution' => 'show' - ], - [ - 'access' => 'systemMaintainer', - 'icon' => 'EXT:extensionmanager/Resources/Public/Icons/module-extensionmanager.svg', - 'labels' => 'LLL:EXT:extensionmanager/Resources/Private/Language/locallang_mod.xlf', - ] - ); - - // Register extension status report system - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['Extension Manager'][] = - \TYPO3\CMS\Extensionmanager\Report\ExtensionStatus::class; -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Extensionmanager', + 'tools', + 'extensionmanager', + '', + [ + 'List' => 'index,unresolvedDependencies,ter,showAllVersions,distributions', + 'Action' => 'toggleExtensionInstallationState,installExtensionWithoutSystemDependencyCheck,removeExtension,downloadExtensionZip,reloadExtensionData', + 'Configuration' => 'showConfigurationForm,save,saveAndClose', + 'Download' => 'checkDependencies,installFromTer,installExtensionWithoutSystemDependencyCheck,installDistribution,updateExtension,updateCommentForUpdatableVersions', + 'UpdateScript' => 'show', + 'UpdateFromTer' => 'updateExtensionListFromTer', + 'UploadExtensionFile' => 'form,extract', + 'Distribution' => 'show' + ], + [ + 'access' => 'systemMaintainer', + 'icon' => 'EXT:extensionmanager/Resources/Public/Icons/module-extensionmanager.svg', + 'labels' => 'LLL:EXT:extensionmanager/Resources/Private/Language/locallang_mod.xlf', + ] +); diff --git a/typo3/sysext/feedit/ext_localconf.php b/typo3/sysext/feedit/ext_localconf.php index b356fa8821fd..c531b71762e6 100644 --- a/typo3/sysext/feedit/ext_localconf.php +++ b/typo3/sysext/feedit/ext_localconf.php @@ -4,11 +4,9 @@ defined('TYPO3_MODE') or die(); // Register the edit panel view. $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'] = \TYPO3\CMS\Feedit\FrontendEditPanel::class; -if (TYPO3_MODE === 'FE') { - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect( - \TYPO3\CMS\Backend\Controller\EditDocumentController::class, - 'initAfter', - \TYPO3\CMS\Feedit\FrontendEditAssetLoader::class, - 'attachAssets' - ); -} +\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect( + \TYPO3\CMS\Backend\Controller\EditDocumentController::class, + 'initAfter', + \TYPO3\CMS\Feedit\FrontendEditAssetLoader::class, + 'attachAssets' +); diff --git a/typo3/sysext/felogin/ext_localconf.php b/typo3/sysext/felogin/ext_localconf.php index ddf38ba7a146..fc168810c13f 100644 --- a/typo3/sysext/felogin/ext_localconf.php +++ b/typo3/sysext/felogin/ext_localconf.php @@ -170,21 +170,19 @@ tt_content.login { ); // Add login to new content element wizard -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' - mod.wizards.newContentElement.wizardItems.forms { - elements.login { - iconIdentifier = content-elements-login - title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:forms_login_title - description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:forms_login_description - tt_content_defValues { - CType = login - } +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' + mod.wizards.newContentElement.wizardItems.forms { + elements.login { + iconIdentifier = content-elements-login + title = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:forms_login_title + description = LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:forms_login_description + tt_content_defValues { + CType = login } - show :=addToList(login) } - '); -} + show :=addToList(login) + } +'); // Page module hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['felogin'] = \TYPO3\CMS\Felogin\Hooks\CmsLayout::class; diff --git a/typo3/sysext/filelist/ext_localconf.php b/typo3/sysext/filelist/ext_localconf.php index c7adffac8fcf..873ca1b3138e 100644 --- a/typo3/sysext/filelist/ext_localconf.php +++ b/typo3/sysext/filelist/ext_localconf.php @@ -1,4 +1,8 @@ <?php defined('TYPO3_MODE') or die(); +$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418731] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileProvider::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418732] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FilemountsProvider::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418733] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider::class; +$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418734] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider::class; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Filelist\Hook\BackendControllerHook::class . '->addJavaScript'; diff --git a/typo3/sysext/filelist/ext_tables.php b/typo3/sysext/filelist/ext_tables.php index 92b97ebf9cb9..19cb5dc32a0a 100644 --- a/typo3/sysext/filelist/ext_tables.php +++ b/typo3/sysext/filelist/ext_tables.php @@ -1,25 +1,18 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Filelist', - 'file', - 'list', - '', - [ - 'FileList' => 'index, search', - ], - [ - 'access' => 'user,group', - 'workspaces' => 'online,custom', - 'icon' => 'EXT:filelist/Resources/Public/Icons/module-filelist.svg', - 'labels' => 'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf' - ] - ); - - $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418731] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileProvider::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418732] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FilemountsProvider::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418733] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418734] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider::class; -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Filelist', + 'file', + 'list', + '', + [ + 'FileList' => 'index, search', + ], + [ + 'access' => 'user,group', + 'workspaces' => 'online,custom', + 'icon' => 'EXT:filelist/Resources/Public/Icons/module-filelist.svg', + 'labels' => 'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf' + ] +); diff --git a/typo3/sysext/form/ext_localconf.php b/typo3/sysext/form/ext_localconf.php index 4611e1d186f9..a3f4ec957952 100644 --- a/typo3/sysext/form/ext_localconf.php +++ b/typo3/sysext/form/ext_localconf.php @@ -2,80 +2,81 @@ defined('TYPO3_MODE') or die(); call_user_func(function () { - if (TYPO3_MODE === 'BE') { - // Hook to enrich tt_content form flex element with finisher settings and form list drop down - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][ - \TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::class - ] = \TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::class; + // Hook to enrich tt_content form flex element with finisher settings and form list drop down + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][ + \TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::class + ] = \TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::class; - // Hook to count used forms elements in tt_content - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser']['formPersistenceIdentifier'] = - \TYPO3\CMS\Form\Hooks\SoftReferenceParserHook::class; + // Hook to count used forms elements in tt_content + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser']['formPersistenceIdentifier'] = + \TYPO3\CMS\Form\Hooks\SoftReferenceParserHook::class; - // Register for hook to show preview of tt_content element of CType="form_formframework" in page module - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['form_formframework'] = - \TYPO3\CMS\Form\Hooks\FormPagePreviewRenderer::class; + // Register for hook to show preview of tt_content element of CType="form_formframework" in page module + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['form_formframework'] = + \TYPO3\CMS\Form\Hooks\FormPagePreviewRenderer::class; - // Add a bunch of icons to icon registry - $iconIdentifiers = [ - 'advanced-password', - 'checkbox', - 'content-element', - 'date-picker', - 'duplicate', - 'email', - 'fieldset', - 'file-upload', - 'finisher', - 'form-element-selector', - 'gridcontainer', - 'gridrow', - 'hidden', - 'image-upload', - 'insert-after', - 'insert-in', - 'multi-checkbox', - 'multi-select', - 'number', - 'page', - 'password', - 'radio-button', - 'single-select', - 'static-text', - 'summary-page', - 'telephone', - 'text', - 'textarea', - 'url', - 'validator' - ]; - $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); - foreach ($iconIdentifiers as $iconIdentifier) { - $iconRegistry->registerIcon( - 't3-form-icon-' . $iconIdentifier, - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, - ['source' => 'EXT:form/Resources/Public/Images/' . $iconIdentifier . '.svg'] - ); - } - - // Add new content element wizard entry - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( - '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/PageTS/modWizards.ts">' + // Add a bunch of icons to icon registry + $iconIdentifiers = [ + 'advanced-password', + 'checkbox', + 'content-element', + 'date-picker', + 'duplicate', + 'email', + 'fieldset', + 'file-upload', + 'finisher', + 'form-element-selector', + 'gridcontainer', + 'gridrow', + 'hidden', + 'image-upload', + 'insert-after', + 'insert-in', + 'multi-checkbox', + 'multi-select', + 'number', + 'page', + 'password', + 'radio-button', + 'single-select', + 'static-text', + 'summary-page', + 'telephone', + 'text', + 'textarea', + 'url', + 'validator' + ]; + $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + foreach ($iconIdentifiers as $iconIdentifier) { + $iconRegistry->registerIcon( + 't3-form-icon-' . $iconIdentifier, + \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + ['source' => 'EXT:form/Resources/Public/Images/' . $iconIdentifier . '.svg'] ); } - if (TYPO3_MODE === 'FE') { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['afterSubmit'][1489772699] - = \TYPO3\CMS\Form\Hooks\FormElementsOnSubmitHooks::class; + // Add new content element wizard entry + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( + '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/PageTS/modWizards.ts">' + ); - // FE file upload processing - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['afterBuildingFinished'][1489772699] - = \TYPO3\CMS\Form\Mvc\Property\PropertyMappingConfiguration::class; + // Add new content element wizard entry + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( + '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/PageTS/modWizards.ts">' + ); - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter( - \TYPO3\CMS\Form\Mvc\Property\TypeConverter\UploadedFileReferenceConverter::class - ); - } + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['afterSubmit'][1489772699] + = \TYPO3\CMS\Form\Hooks\FormElementsOnSubmitHooks::class; + + // FE file upload processing + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['afterBuildingFinished'][1489772699] + = \TYPO3\CMS\Form\Mvc\Property\PropertyMappingConfiguration::class; + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter( + \TYPO3\CMS\Form\Mvc\Property\TypeConverter\UploadedFileReferenceConverter::class + ); // Register "formvh:" namespace $GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['formvh'][] = 'TYPO3\\CMS\\Form\\ViewHelpers'; diff --git a/typo3/sysext/form/ext_tables.php b/typo3/sysext/form/ext_tables.php index 83b3d92e8c60..c36388ffdd41 100644 --- a/typo3/sysext/form/ext_tables.php +++ b/typo3/sysext/form/ext_tables.php @@ -1,23 +1,21 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - // Register the backend module Web->Forms - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Form', - 'web', - 'formbuilder', - '', - [ - 'FormManager' => 'index, show, create, duplicate, references, delete', - 'FormEditor' => 'index, saveForm, renderFormPage, renderRenderableOptions', - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:form/Resources/Public/Icons/module-form.svg', - 'labels' => 'LLL:EXT:form/Resources/Private/Language/locallang_module.xlf', - 'navigationComponentId' => '', - 'inheritNavigationComponentFromMainModule' => false - ] - ); -} +// Register the backend module Web->Forms +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Form', + 'web', + 'formbuilder', + '', + [ + 'FormManager' => 'index, show, create, duplicate, references, delete', + 'FormEditor' => 'index, saveForm, renderFormPage, renderRenderableOptions', + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:form/Resources/Public/Icons/module-form.svg', + 'labels' => 'LLL:EXT:form/Resources/Private/Language/locallang_module.xlf', + 'navigationComponentId' => '', + 'inheritNavigationComponentFromMainModule' => false + ] +); diff --git a/typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php b/typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php index d9614fdfb720..b313fd325c1e 100644 --- a/typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php +++ b/typo3/sysext/frontend/Classes/Aspect/FileMetadataOverlayAspect.php @@ -33,6 +33,10 @@ class FileMetadataOverlayAspect */ public function languageAndWorkspaceOverlay(\ArrayObject $data) { + // Should only be in Frontend, but not in eID context + if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_FE) || isset($_REQUEST['eID'])) { + return; + } $overlaidMetaData = $data->getArrayCopy(); $this->getTsfe()->sys_page->versionOL('sys_file_metadata', $overlaidMetaData); $overlaidMetaData = $this->getTsfe()->sys_page->getRecordOverlay( diff --git a/typo3/sysext/frontend/ext_localconf.php b/typo3/sysext/frontend/ext_localconf.php index e9675d6d1acd..62855f12d69c 100644 --- a/typo3/sysext/frontend/ext_localconf.php +++ b/typo3/sysext/frontend/ext_localconf.php @@ -1,14 +1,12 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'FE' && !isset($_REQUEST['eID'])) { - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect( - \TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class, - 'recordPostRetrieval', - \TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::class, - 'languageAndWorkspaceOverlay' - ); -} +\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect( + \TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class, + 'recordPostRetrieval', + \TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::class, + 'languageAndWorkspaceOverlay' +); // Register all available content objects $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], [ diff --git a/typo3/sysext/frontend/ext_tables.php b/typo3/sysext/frontend/ext_tables.php index 4731ab50d995..e8a4cdca6cc0 100644 --- a/typo3/sysext/frontend/ext_tables.php +++ b/typo3/sysext/frontend/ext_tables.php @@ -4,11 +4,9 @@ defined('TYPO3_MODE') or die(); // Add allowed records to pages \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('pages_language_overlay,tt_content,sys_template,sys_domain,backend_layout'); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_layout', 'EXT:frontend/Resources/Private/Language/locallang_csh_weblayout.xlf'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_groups', 'EXT:frontend/Resources/Private/Language/locallang_csh_fe_groups.xlf'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_users', 'EXT:frontend/Resources/Private/Language/locallang_csh_fe_users.xlf'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_domain', 'EXT:frontend/Resources/Private/Language/locallang_csh_sysdomain.xlf'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_template', 'EXT:frontend/Resources/Private/Language/locallang_csh_systmpl.xlf'); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tt_content', 'EXT:frontend/Resources/Private/Language/locallang_csh_ttcontent.xlf'); -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_layout', 'EXT:frontend/Resources/Private/Language/locallang_csh_weblayout.xlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_groups', 'EXT:frontend/Resources/Private/Language/locallang_csh_fe_groups.xlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('fe_users', 'EXT:frontend/Resources/Private/Language/locallang_csh_fe_users.xlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_domain', 'EXT:frontend/Resources/Private/Language/locallang_csh_sysdomain.xlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_template', 'EXT:frontend/Resources/Private/Language/locallang_csh_systmpl.xlf'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tt_content', 'EXT:frontend/Resources/Private/Language/locallang_csh_ttcontent.xlf'); diff --git a/typo3/sysext/impexp/ext_localconf.php b/typo3/sysext/impexp/ext_localconf.php index aeca3b719ad8..2447648c6290 100644 --- a/typo3/sysext/impexp/ext_localconf.php +++ b/typo3/sysext/impexp/ext_localconf.php @@ -2,3 +2,9 @@ defined('TYPO3_MODE') or die(); $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Impexp\Hook\BackendControllerHook::class . '->addJavaScript'; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['impexp'][\TYPO3\CMS\Impexp\Task\ImportExportTask::class] = [ + 'title' => 'LLL:EXT:impexp/Resources/Private/Language/locallang_csh.xlf:.alttitle', + 'description' => 'LLL:EXT:impexp/Resources/Private/Language/locallang_csh.xlf:.description', + 'icon' => 'EXT:impexp/Resources/Public/Images/export.gif' +]; +$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418735] = \TYPO3\CMS\Impexp\ContextMenu\ItemProvider::class; diff --git a/typo3/sysext/impexp/ext_tables.php b/typo3/sysext/impexp/ext_tables.php index 652182ce773a..196447082a46 100644 --- a/typo3/sysext/impexp/ext_tables.php +++ b/typo3/sysext/impexp/ext_tables.php @@ -1,13 +1,4 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['impexp'][\TYPO3\CMS\Impexp\Task\ImportExportTask::class] = [ - 'title' => 'LLL:EXT:impexp/Resources/Private/Language/locallang_csh.xlf:.alttitle', - 'description' => 'LLL:EXT:impexp/Resources/Private/Language/locallang_csh.xlf:.description', - 'icon' => 'EXT:impexp/Resources/Public/Images/export.gif' - ]; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_tx_impexp', 'EXT:impexp/Resources/Private/Language/locallang_csh.xlf'); - - $GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418735] = \TYPO3\CMS\Impexp\ContextMenu\ItemProvider::class; -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_tx_impexp', 'EXT:impexp/Resources/Private/Language/locallang_csh.xlf'); diff --git a/typo3/sysext/indexed_search/ext_localconf.php b/typo3/sysext/indexed_search/ext_localconf.php index 4df1d6d5b6ef..2e34627a8c93 100644 --- a/typo3/sysext/indexed_search/ext_localconf.php +++ b/typo3/sysext/indexed_search/ext_localconf.php @@ -72,22 +72,20 @@ if (isset($extConf['useMysqlFulltext']) && $extConf['useMysqlFulltext'] === '1') } // Add search to new content element wizard -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' - mod.wizards.newContentElement.wizardItems.forms { - elements.search { - iconIdentifier = content-elements-searchform - title = LLL:EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf:pi_wizard_title - description = LLL:EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf:pi_wizard_description - tt_content_defValues { - CType = list - list_type = indexedsearch_pi2 - } +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' +mod.wizards.newContentElement.wizardItems.forms { + elements.search { + iconIdentifier = content-elements-searchform + title = LLL:EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf:pi_wizard_title + description = LLL:EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf:pi_wizard_description + tt_content_defValues { + CType = list + list_type = indexedsearch_pi2 } - show :=addToList(search) } - '); + show :=addToList(search) } +'); // Use the advanced doubleMetaphone parser instead of the internal one (usage of metaphone parsers is generally disabled by default) if (isset($extConf['enableMetaphoneSearch']) && (int)$extConf['enableMetaphoneSearch'] == 2) { diff --git a/typo3/sysext/indexed_search/ext_tables.php b/typo3/sysext/indexed_search/ext_tables.php index 299ea88e0744..971ad4e83fc2 100644 --- a/typo3/sysext/indexed_search/ext_tables.php +++ b/typo3/sysext/indexed_search/ext_tables.php @@ -1,22 +1,20 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.IndexedSearch', - 'web', - 'isearch', - '', - [ - 'Administration' => 'index,pages,externalDocuments,statistic,statisticDetails,deleteIndexedItem,saveStopwordsKeywords,wordDetail', - ], - [ - 'access' => 'admin', - 'icon' => 'EXT:indexed_search/Resources/Public/Icons/module-indexed_search.svg', - 'labels' => 'LLL:EXT:indexed_search/Resources/Private/Language/locallang_mod.xlf', - ] - ); -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.IndexedSearch', + 'web', + 'isearch', + '', + [ + 'Administration' => 'index,pages,externalDocuments,statistic,statisticDetails,deleteIndexedItem,saveStopwordsKeywords,wordDetail', + ], + [ + 'access' => 'admin', + 'icon' => 'EXT:indexed_search/Resources/Public/Icons/module-indexed_search.svg', + 'labels' => 'LLL:EXT:indexed_search/Resources/Private/Language/locallang_mod.xlf', + ] +); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('index_config'); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('index_config', 'EXT:indexed_search/Resources/Private/Language/locallang_csh_indexcfg.xlf'); diff --git a/typo3/sysext/info/ext_tables.php b/typo3/sysext/info/ext_tables.php index 7715a91de1eb..0692b744753f 100644 --- a/typo3/sysext/info/ext_tables.php +++ b/typo3/sysext/info/ext_tables.php @@ -1,39 +1,37 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \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::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' - ); -} +\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' +); diff --git a/typo3/sysext/install/ext_localconf.php b/typo3/sysext/install/ext_localconf.php index aa610a1bceec..c0843db3145e 100644 --- a/typo3/sysext/install/ext_localconf.php +++ b/typo3/sysext/install/ext_localconf.php @@ -66,3 +66,12 @@ foreach ($icons as $iconIdentifier => $source) { ['source' => $source] ); } + +// Register report module additions +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = \TYPO3\CMS\Install\Report\InstallStatusReport::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Install\Report\SecurityStatusReport::class; + +// Only add the environment status report if not in CLI mode +if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) { + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class; +} diff --git a/typo3/sysext/install/ext_tables.php b/typo3/sysext/install/ext_tables.php index 2b0b31d3baf0..1ae8428d78bd 100644 --- a/typo3/sysext/install/ext_tables.php +++ b/typo3/sysext/install/ext_tables.php @@ -1,66 +1,55 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - // Register report module additions - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = \TYPO3\CMS\Install\Report\InstallStatusReport::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Install\Report\SecurityStatusReport::class; - - // Only add the environment status report if not in CLI mode - if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Install\Report\EnvironmentStatusReport::class; - } - - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'tools', - 'toolsmaintenance', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::maintenanceAction', - 'access' => 'systemMaintainer', - 'name' => 'tools_toolsmaintenance', - 'iconIdentifier' => 'module-install-maintenance', - 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallMaintenance.xlf' - ] - ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'tools', - 'toolssettings', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::settingsAction', - 'access' => 'systemMaintainer', - 'name' => 'tools_toolssettings', - 'iconIdentifier' => 'module-install-settings', - 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallSettings.xlf' - ] - ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'tools', - 'toolsupgrade', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::upgradeAction', - 'access' => 'systemMaintainer', - 'name' => 'tools_toolsupgrade', - 'iconIdentifier' => 'module-install-upgrade', - 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallUpgrade.xlf' - ] - ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'tools', - 'toolsenvironment', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::environmentAction', - 'access' => 'systemMaintainer', - 'name' => 'tools_toolsenvironment', - 'iconIdentifier' => 'module-install-environment', - 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallEnvironment.xlf' - ] - ); -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'tools', + 'toolsmaintenance', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::maintenanceAction', + 'access' => 'systemMaintainer', + 'name' => 'tools_toolsmaintenance', + 'iconIdentifier' => 'module-install-maintenance', + 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallMaintenance.xlf' + ] +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'tools', + 'toolssettings', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::settingsAction', + 'access' => 'systemMaintainer', + 'name' => 'tools_toolssettings', + 'iconIdentifier' => 'module-install-settings', + 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallSettings.xlf' + ] +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'tools', + 'toolsupgrade', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::upgradeAction', + 'access' => 'systemMaintainer', + 'name' => 'tools_toolsupgrade', + 'iconIdentifier' => 'module-install-upgrade', + 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallUpgrade.xlf' + ] +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'tools', + 'toolsenvironment', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Install\Controller\BackendModuleController::class . '::environmentAction', + 'access' => 'systemMaintainer', + 'name' => 'tools_toolsenvironment', + 'iconIdentifier' => 'module-install-environment', + 'labels' => 'LLL:EXT:install/Resources/Private/Language/ModuleInstallEnvironment.xlf' + ] +); diff --git a/typo3/sysext/lang/ext_tables.php b/typo3/sysext/lang/ext_tables.php index 5765b16b9a40..705c5691097f 100644 --- a/typo3/sysext/lang/ext_tables.php +++ b/typo3/sysext/lang/ext_tables.php @@ -1,21 +1,18 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - - // Register the backend module - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Lang', - 'tools', - 'language', - 'after:extensionmanager', - [ - 'Language' => 'listLanguages, listTranslations, getTranslations, updateLanguage, updateTranslation, activateLanguage, deactivateLanguage, removeLanguage', - ], - [ - 'access' => 'systemMaintainer', - 'icon' => 'EXT:lang/Resources/Public/Icons/module-lang.svg', - 'labels' => 'LLL:EXT:lang/Resources/Private/Language/locallang_mod.xlf', - ] - ); -} +// Register the backend module +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Lang', + 'tools', + 'language', + 'after:extensionmanager', + [ + 'Language' => 'listLanguages, listTranslations, getTranslations, updateLanguage, updateTranslation, activateLanguage, deactivateLanguage, removeLanguage', + ], + [ + 'access' => 'systemMaintainer', + 'icon' => 'EXT:lang/Resources/Public/Icons/module-lang.svg', + 'labels' => 'LLL:EXT:lang/Resources/Private/Language/locallang_mod.xlf', + ] +); diff --git a/typo3/sysext/linkvalidator/ext_tables.php b/typo3/sysext/linkvalidator/ext_tables.php index 46f774c60da3..1e1d39cdb253 100644 --- a/typo3/sysext/linkvalidator/ext_tables.php +++ b/typo3/sysext/linkvalidator/ext_tables.php @@ -1,15 +1,14 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - // Add module - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( - 'web_info', - \TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport::class, - null, - 'LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:mod_linkvalidator' - ); -} +// Add module +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( + 'web_info', + \TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport::class, + null, + 'LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:mod_linkvalidator' +); + // Initialize Context Sensitive Help (CSH) \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( 'linkvalidator', diff --git a/typo3/sysext/lowlevel/ext_tables.php b/typo3/sysext/lowlevel/ext_tables.php index 7d22cb6db6a7..cf8220c72c18 100644 --- a/typo3/sysext/lowlevel/ext_tables.php +++ b/typo3/sysext/lowlevel/ext_tables.php @@ -1,33 +1,31 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'system', - 'dbint', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController::class . '::mainAction', - 'access' => 'admin', - 'name' => 'system_dbint', - 'workspaces' => 'online', - 'icon' => 'EXT:lowlevel/Resources/Public/Icons/module-dbint.svg', - 'labels' => 'LLL:EXT:lowlevel/Resources/Private/Language/locallang_mod.xlf' - ] - ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'system', - 'config', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Lowlevel\Controller\ConfigurationController::class . '::mainAction', - 'access' => 'admin', - 'name' => 'system_config', - 'workspaces' => 'online', - 'icon' => 'EXT:lowlevel/Resources/Public/Icons/module-config.svg', - 'labels' => 'LLL:EXT:lowlevel/Resources/Private/Language/locallang_mod_configuration.xlf' - ] - ); -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'system', + 'dbint', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Lowlevel\Controller\DatabaseIntegrityController::class . '::mainAction', + 'access' => 'admin', + 'name' => 'system_dbint', + 'workspaces' => 'online', + 'icon' => 'EXT:lowlevel/Resources/Public/Icons/module-dbint.svg', + 'labels' => 'LLL:EXT:lowlevel/Resources/Private/Language/locallang_mod.xlf' + ] +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'system', + 'config', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Lowlevel\Controller\ConfigurationController::class . '::mainAction', + 'access' => 'admin', + 'name' => 'system_config', + 'workspaces' => 'online', + 'icon' => 'EXT:lowlevel/Resources/Public/Icons/module-config.svg', + 'labels' => 'LLL:EXT:lowlevel/Resources/Private/Language/locallang_mod_configuration.xlf' + ] +); diff --git a/typo3/sysext/opendocs/ext_localconf.php b/typo3/sysext/opendocs/ext_localconf.php index 857b2164fdf9..c94cca63cb51 100644 --- a/typo3/sysext/opendocs/ext_localconf.php +++ b/typo3/sysext/opendocs/ext_localconf.php @@ -1,6 +1,6 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433112] = \TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::class; -} +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433112] = \TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::class; +// Register update signal to update the number of open documents +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['updateSignalHook']['OpendocsController::updateNumber'] = \TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::class . '->updateNumberOfOpenDocsHook'; diff --git a/typo3/sysext/opendocs/ext_tables.php b/typo3/sysext/opendocs/ext_tables.php deleted file mode 100644 index 146deb552819..000000000000 --- a/typo3/sysext/opendocs/ext_tables.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -defined('TYPO3_MODE') or die(); - -if (TYPO3_MODE === 'BE') { - // Register update signal to update the number of open documents - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['updateSignalHook']['OpendocsController::updateNumber'] = \TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::class . '->updateNumberOfOpenDocsHook'; -} diff --git a/typo3/sysext/recordlist/ext_localconf.php b/typo3/sysext/recordlist/ext_localconf.php index b325ac5fe708..cfbf3fb2b1e6 100644 --- a/typo3/sysext/recordlist/ext_localconf.php +++ b/typo3/sysext/recordlist/ext_localconf.php @@ -1,6 +1,11 @@ <?php defined('TYPO3_MODE') or die(); +// Register element browsers +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['db'] = \TYPO3\CMS\Recordlist\Browser\DatabaseBrowser::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['file'] = \TYPO3\CMS\Recordlist\Browser\FileBrowser::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['folder'] = \TYPO3\CMS\Recordlist\Browser\FolderBrowser::class; + // Register default link handlers \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' TCEMAIN.linkHandler { diff --git a/typo3/sysext/recordlist/ext_tables.php b/typo3/sysext/recordlist/ext_tables.php index 204159ab80e7..88ce599aebf2 100644 --- a/typo3/sysext/recordlist/ext_tables.php +++ b/typo3/sysext/recordlist/ext_tables.php @@ -1,23 +1,16 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'web', - 'list', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Recordlist\RecordList::class . '::mainAction', - 'access' => 'user,group', - 'name' => 'web_list', - 'icon' => 'EXT:recordlist/Resources/Public/Icons/module-list.svg', - 'labels' => 'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf' - ] - ); - - // register element browsers - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['db'] = \TYPO3\CMS\Recordlist\Browser\DatabaseBrowser::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['file'] = \TYPO3\CMS\Recordlist\Browser\FileBrowser::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers']['folder'] = \TYPO3\CMS\Recordlist\Browser\FolderBrowser::class; -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'web', + 'list', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Recordlist\RecordList::class . '::mainAction', + 'access' => 'user,group', + 'name' => 'web_list', + 'icon' => 'EXT:recordlist/Resources/Public/Icons/module-list.svg', + 'labels' => 'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf' + ] +); diff --git a/typo3/sysext/recycler/ext_tables.php b/typo3/sysext/recycler/ext_tables.php index 1ca7e85853e0..d4d202dbc189 100644 --- a/typo3/sysext/recycler/ext_tables.php +++ b/typo3/sysext/recycler/ext_tables.php @@ -1,19 +1,17 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Recycler', - 'web', - 'Recycler', - '', - [ - 'RecyclerModule' => 'index', - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:recycler/Resources/Public/Icons/module-recycler.svg', - 'labels' => 'LLL:EXT:recycler/Resources/Private/Language/locallang_mod.xlf', - ] - ); -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Recycler', + 'web', + 'Recycler', + '', + [ + 'RecyclerModule' => 'index', + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:recycler/Resources/Public/Icons/module-recycler.svg', + 'labels' => 'LLL:EXT:recycler/Resources/Private/Language/locallang_mod.xlf', + ] +); diff --git a/typo3/sysext/reports/ext_localconf.php b/typo3/sysext/reports/ext_localconf.php index e3fa15deb3f7..e5d8fe7a4c16 100644 --- a/typo3/sysext/reports/ext_localconf.php +++ b/typo3/sysext/reports/ext_localconf.php @@ -9,3 +9,28 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Repor ]; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['displayWarningMessages']['tx_reports_WarningMessagePostProcessor'] = \TYPO3\CMS\Reports\Report\Status\WarningMessagePostProcessor::class; + +if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'])) { + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'] = []; +} +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'] = array_merge( + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'], + [ + 'title' => 'LLL:EXT:reports/Resources/Private/Language/locallang_reports.xlf:status_report_title', + 'icon' => 'EXT:reports/Resources/Public/Icons/module-reports.svg', + 'description' => 'LLL:EXT:reports/Resources/Private/Language/locallang_reports.xlf:status_report_description', + 'report' => \TYPO3\CMS\Reports\Report\Status\Status::class + ] +); +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = \TYPO3\CMS\Reports\Report\Status\Typo3Status::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Reports\Report\Status\SystemStatus::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Reports\Report\Status\SecurityStatus::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['configuration'][] = \TYPO3\CMS\Reports\Report\Status\ConfigurationStatus::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['fal'][] = \TYPO3\CMS\Reports\Report\Status\FalStatus::class; + +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['sv']['services'] = [ + 'title' => 'LLL:EXT:reports/Resources/Private/Language/locallang_servicereport.xlf:report_title', + 'description' => 'LLL:EXT:reports/Resources/Private/Language/locallang_servicereport.xlf:report_description', + 'icon' => 'EXT:reports/Resources/Public/Images/service-reports.png', + 'report' => \TYPO3\CMS\Reports\Report\ServicesListReport::class +]; diff --git a/typo3/sysext/reports/ext_tables.php b/typo3/sysext/reports/ext_tables.php index f269cf66fc4b..2fe2d1ad4c7f 100644 --- a/typo3/sysext/reports/ext_tables.php +++ b/typo3/sysext/reports/ext_tables.php @@ -1,43 +1,17 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Reports', - 'system', - 'txreportsM1', - '', - [ - 'Report' => 'index,detail' - ], - [ - 'access' => 'admin', - 'icon' => 'EXT:reports/Resources/Public/Icons/module-reports.svg', - 'labels' => 'LLL:EXT:reports/Resources/Private/Language/locallang.xlf' - ] - ); - if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'])) { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'] = []; - } - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'] = array_merge( - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status'], - [ - 'title' => 'LLL:EXT:reports/Resources/Private/Language/locallang_reports.xlf:status_report_title', - 'icon' => 'EXT:reports/Resources/Public/Icons/module-reports.svg', - 'description' => 'LLL:EXT:reports/Resources/Private/Language/locallang_reports.xlf:status_report_description', - 'report' => \TYPO3\CMS\Reports\Report\Status\Status::class - ] - ); - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['typo3'][] = \TYPO3\CMS\Reports\Report\Status\Typo3Status::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['system'][] = \TYPO3\CMS\Reports\Report\Status\SystemStatus::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['security'][] = \TYPO3\CMS\Reports\Report\Status\SecurityStatus::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['configuration'][] = \TYPO3\CMS\Reports\Report\Status\ConfigurationStatus::class; - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['fal'][] = \TYPO3\CMS\Reports\Report\Status\FalStatus::class; - - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['sv']['services'] = [ - 'title' => 'LLL:EXT:reports/Resources/Private/Language/locallang_servicereport.xlf:report_title', - 'description' => 'LLL:EXT:reports/Resources/Private/Language/locallang_servicereport.xlf:report_description', - 'icon' => 'EXT:reports/Resources/Public/Images/service-reports.png', - 'report' => \TYPO3\CMS\Reports\Report\ServicesListReport::class - ]; -} +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Reports', + 'system', + 'txreportsM1', + '', + [ + 'Report' => 'index,detail' + ], + [ + 'access' => 'admin', + 'icon' => 'EXT:reports/Resources/Public/Icons/module-reports.svg', + 'labels' => 'LLL:EXT:reports/Resources/Private/Language/locallang.xlf' + ] +); diff --git a/typo3/sysext/rte_ckeditor/ext_localconf.php b/typo3/sysext/rte_ckeditor/ext_localconf.php index 0fde35253a1b..c349e2af76ee 100644 --- a/typo3/sysext/rte_ckeditor/ext_localconf.php +++ b/typo3/sysext/rte_ckeditor/ext_localconf.php @@ -8,7 +8,7 @@ $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeResolver'][1480314091] = [ 'class' => \TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver::class, ]; -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) { +if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE) { \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Core\Page\PageRenderer::class )->addRequireJsConfiguration([ diff --git a/typo3/sysext/scheduler/ext_tables.php b/typo3/sysext/scheduler/ext_tables.php index 7d0589ec8c8b..8bc5e23dfc63 100644 --- a/typo3/sysext/scheduler/ext_tables.php +++ b/typo3/sysext/scheduler/ext_tables.php @@ -1,25 +1,23 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - // Add module - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'system', - 'txschedulerM1', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::class . '::mainAction', - 'access' => 'admin', - 'name' => 'system_txschedulerM1', - 'icon' => 'EXT:scheduler/Resources/Public/Icons/module-scheduler.svg', - 'labels' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang_mod.xlf' - ] - ); +// Add module +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'system', + 'txschedulerM1', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::class . '::mainAction', + 'access' => 'admin', + 'name' => 'system_txschedulerM1', + 'icon' => 'EXT:scheduler/Resources/Public/Icons/module-scheduler.svg', + 'labels' => 'LLL:EXT:scheduler/Resources/Private/Language/locallang_mod.xlf' + ] +); - // Add context sensitive help (csh) to the backend module - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( - '_MOD_system_txschedulerM1', - 'EXT:scheduler/Resources/Private/Language/locallang_csh_scheduler.xlf' - ); -} +// Add context sensitive help (csh) to the backend module +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( + '_MOD_system_txschedulerM1', + 'EXT:scheduler/Resources/Private/Language/locallang_csh_scheduler.xlf' +); diff --git a/typo3/sysext/setup/ext_tables.php b/typo3/sysext/setup/ext_tables.php index dc185994ca0d..437932058971 100644 --- a/typo3/sysext/setup/ext_tables.php +++ b/typo3/sysext/setup/ext_tables.php @@ -1,142 +1,140 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'user', - 'setup', - 'after:task', - '', - [ - 'routeTarget' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '::mainAction', - 'access' => 'group,user', - 'name' => 'user_setup', - 'icon' => 'EXT:setup/Resources/Public/Icons/module-setup.svg', - 'labels' => 'LLL:EXT:setup/Resources/Private/Language/locallang_mod.xlf' - ] - ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( - '_MOD_user_setup', - 'EXT:setup/Resources/Private/Language/locallang_csh_mod.xlf' - ); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'user', + 'setup', + 'after:task', + '', + [ + 'routeTarget' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '::mainAction', + 'access' => 'group,user', + 'name' => 'user_setup', + 'icon' => 'EXT:setup/Resources/Public/Icons/module-setup.svg', + 'labels' => 'LLL:EXT:setup/Resources/Private/Language/locallang_mod.xlf' + ] +); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( + '_MOD_user_setup', + 'EXT:setup/Resources/Private/Language/locallang_csh_mod.xlf' +); - $GLOBALS['TYPO3_USER_SETTINGS'] = [ - 'columns' => [ - 'realName' => [ - 'type' => 'text', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:beUser_realName', - 'table' => 'be_users', - 'csh' => 'beUser_realName', - 'max' => 80 - ], - 'email' => [ - 'type' => 'email', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:beUser_email', - 'table' => 'be_users', - 'csh' => 'beUser_email', - 'max' => 80 - ], - 'emailMeAtLogin' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:emailMeAtLogin', - 'csh' => 'emailMeAtLogin' - ], - 'password' => [ - 'type' => 'password', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:newPassword', - 'table' => 'be_users', - 'csh' => 'newPassword', - ], - 'password2' => [ - 'type' => 'password', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:newPasswordAgain', - 'table' => 'be_users', - 'csh' => 'newPasswordAgain', - ], - 'passwordCurrent' => [ - 'type' => 'password', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:passwordCurrent', - 'table' => 'be_users', - 'csh' => 'passwordCurrent', - ], - 'avatar' => [ - 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:be_users.avatar', - 'type' => 'avatar', - 'table' => 'be_users', - 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] - ], - 'lang' => [ - 'type' => 'select', - 'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderLanguageSelect', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:language', - 'csh' => 'language' - ], - 'startModule' => [ - 'type' => 'select', - 'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderStartModuleSelect', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:startModule', - 'csh' => 'startModule' - ], - 'thumbnailsByDefault' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:showThumbs', - 'csh' => 'showThumbs' - ], - 'titleLen' => [ - 'type' => 'text', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:maxTitleLen', - 'csh' => 'maxTitleLen' - ], - 'edit_RTE' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:edit_RTE', - 'csh' => 'edit_RTE' - ], - 'edit_docModuleUpload' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:edit_docModuleUpload', - 'csh' => 'edit_docModuleUpload' - ], - 'showHiddenFilesAndFolders' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:showHiddenFilesAndFolders', - 'csh' => 'showHiddenFilesAndFolders' - ], - 'copyLevels' => [ - 'type' => 'text', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:copyLevels', - 'csh' => 'copyLevels' - ], - 'recursiveDelete' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:recursiveDelete', - 'csh' => 'recursiveDelete' - ], - 'resetConfiguration' => [ - 'type' => 'button', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfiguration', - 'buttonlabel' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfigurationButton', - 'csh' => 'reset', - 'confirm' => true, - 'confirmData' => [ - 'message' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:setToStandardQuestion', - 'jsCodeAfterOk' => 'document.getElementById(\'setValuesToDefault\').value = 1; document.getElementById(\'SetupModuleController\').submit();' - ] - ], - 'resizeTextareas_Flexible' => [ - 'type' => 'check', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resizeTextareas_Flexible', - 'csh' => 'resizeTextareas_Flexible' - ], - 'resizeTextareas_MaxHeight' => [ - 'type' => 'text', - 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:flexibleTextareas_MaxHeight', - 'csh' => 'flexibleTextareas_MaxHeight' - ], - ], - 'showitem' => '--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:personal_data,realName,email,emailMeAtLogin,avatar,lang, - --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xml:passwordHeader,passwordCurrent,password,password2, - --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:opening,startModule, - --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,resizeTextareas_Flexible,resizeTextareas_MaxHeight,titleLen,thumbnailsByDefault,edit_docModuleUpload,showHiddenFilesAndFolders,copyLevels,recursiveDelete,resetConfiguration' - ]; -} +$GLOBALS['TYPO3_USER_SETTINGS'] = [ + 'columns' => [ + 'realName' => [ + 'type' => 'text', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:beUser_realName', + 'table' => 'be_users', + 'csh' => 'beUser_realName', + 'max' => 80 + ], + 'email' => [ + 'type' => 'email', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:beUser_email', + 'table' => 'be_users', + 'csh' => 'beUser_email', + 'max' => 80 + ], + 'emailMeAtLogin' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:emailMeAtLogin', + 'csh' => 'emailMeAtLogin' + ], + 'password' => [ + 'type' => 'password', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:newPassword', + 'table' => 'be_users', + 'csh' => 'newPassword', + ], + 'password2' => [ + 'type' => 'password', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:newPasswordAgain', + 'table' => 'be_users', + 'csh' => 'newPasswordAgain', + ], + 'passwordCurrent' => [ + 'type' => 'password', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:passwordCurrent', + 'table' => 'be_users', + 'csh' => 'passwordCurrent', + ], + 'avatar' => [ + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:be_users.avatar', + 'type' => 'avatar', + 'table' => 'be_users', + 'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] + ], + 'lang' => [ + 'type' => 'select', + 'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderLanguageSelect', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:language', + 'csh' => 'language' + ], + 'startModule' => [ + 'type' => 'select', + 'itemsProcFunc' => \TYPO3\CMS\Setup\Controller\SetupModuleController::class . '->renderStartModuleSelect', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:startModule', + 'csh' => 'startModule' + ], + 'thumbnailsByDefault' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:showThumbs', + 'csh' => 'showThumbs' + ], + 'titleLen' => [ + 'type' => 'text', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:maxTitleLen', + 'csh' => 'maxTitleLen' + ], + 'edit_RTE' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:edit_RTE', + 'csh' => 'edit_RTE' + ], + 'edit_docModuleUpload' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:edit_docModuleUpload', + 'csh' => 'edit_docModuleUpload' + ], + 'showHiddenFilesAndFolders' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:showHiddenFilesAndFolders', + 'csh' => 'showHiddenFilesAndFolders' + ], + 'copyLevels' => [ + 'type' => 'text', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:copyLevels', + 'csh' => 'copyLevels' + ], + 'recursiveDelete' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:recursiveDelete', + 'csh' => 'recursiveDelete' + ], + 'resetConfiguration' => [ + 'type' => 'button', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfiguration', + 'buttonlabel' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resetConfigurationButton', + 'csh' => 'reset', + 'confirm' => true, + 'confirmData' => [ + 'message' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:setToStandardQuestion', + 'jsCodeAfterOk' => 'document.getElementById(\'setValuesToDefault\').value = 1; document.getElementById(\'SetupModuleController\').submit();' + ] + ], + 'resizeTextareas_Flexible' => [ + 'type' => 'check', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:resizeTextareas_Flexible', + 'csh' => 'resizeTextareas_Flexible' + ], + 'resizeTextareas_MaxHeight' => [ + 'type' => 'text', + 'label' => 'LLL:EXT:setup/Resources/Private/Language/locallang.xlf:flexibleTextareas_MaxHeight', + 'csh' => 'flexibleTextareas_MaxHeight' + ], + ], + 'showitem' => '--div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:personal_data,realName,email,emailMeAtLogin,avatar,lang, + --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xml:passwordHeader,passwordCurrent,password,password2, + --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:opening,startModule, + --div--;LLL:EXT:setup/Resources/Private/Language/locallang.xlf:editFunctionsTab,edit_RTE,resizeTextareas_Flexible,resizeTextareas_MaxHeight,titleLen,thumbnailsByDefault,edit_docModuleUpload,showHiddenFilesAndFolders,copyLevels,recursiveDelete,resetConfiguration' +]; diff --git a/typo3/sysext/sys_action/ext_localconf.php b/typo3/sysext/sys_action/ext_localconf.php index c714e488d94f..56730665e5dd 100644 --- a/typo3/sysext/sys_action/ext_localconf.php +++ b/typo3/sysext/sys_action/ext_localconf.php @@ -1,6 +1,9 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433113] = \TYPO3\CMS\SysAction\Backend\ToolbarItems\ActionToolbarItem::class; -} +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433113] = \TYPO3\CMS\SysAction\Backend\ToolbarItems\ActionToolbarItem::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['sys_action'][\TYPO3\CMS\SysAction\ActionTask::class] = [ + 'title' => 'LLL:EXT:sys_action/Resources/Private/Language/locallang_tca.xlf:sys_action', + 'description' => 'LLL:EXT:sys_action/Resources/Private/Language/locallang_csh_sysaction.xlf:.description', + 'icon' => 'EXT:sys_action/Resources/Public/Images/x-sys_action.png' +]; diff --git a/typo3/sysext/sys_action/ext_tables.php b/typo3/sysext/sys_action/ext_tables.php index 68281d30f442..c1648f6acc63 100644 --- a/typo3/sysext/sys_action/ext_tables.php +++ b/typo3/sysext/sys_action/ext_tables.php @@ -1,11 +1,4 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_action', 'EXT:sys_action/Resources/Private/Language/locallang_csh_sysaction.xlf'); - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['sys_action'][\TYPO3\CMS\SysAction\ActionTask::class] = [ - 'title' => 'LLL:EXT:sys_action/Resources/Private/Language/locallang_tca.xlf:sys_action', - 'description' => 'LLL:EXT:sys_action/Resources/Private/Language/locallang_csh_sysaction.xlf:.description', - 'icon' => 'EXT:sys_action/Resources/Public/Images/x-sys_action.png' - ]; -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_action', 'EXT:sys_action/Resources/Private/Language/locallang_csh_sysaction.xlf'); diff --git a/typo3/sysext/t3editor/ext_localconf.php b/typo3/sysext/t3editor/ext_localconf.php index 1bee39862db2..97f91011ccdd 100644 --- a/typo3/sysext/t3editor/ext_localconf.php +++ b/typo3/sysext/t3editor/ext_localconf.php @@ -1,15 +1,19 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'][] = \TYPO3\CMS\T3editor\Hook\FileEditHook::class . '->preOutputProcessingHook'; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'][] = \TYPO3\CMS\T3editor\Hook\FileEditHook::class . '->preOutputProcessingHook'; +if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE) { // We need this at a central place because CodeMirror uses relative paths in its module definitions and using PageRenderer is prohibited in FormEngine - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class)->addRequireJsConfiguration([ + \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( + \TYPO3\CMS\Core\Page\PageRenderer::class + )->addRequireJsConfiguration([ 'packages' => [ [ 'name' => 'cm', - 'location' => \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:t3editor/Resources/Public/JavaScript/Contrib/cm')), + 'location' => \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath( + \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:t3editor/Resources/Public/JavaScript/Contrib/cm') + ), 'main' => 'lib/codemirror', ], ], diff --git a/typo3/sysext/taskcenter/ext_tables.php b/typo3/sysext/taskcenter/ext_tables.php index eb750cfa2150..7bac1c9efd22 100644 --- a/typo3/sysext/taskcenter/ext_tables.php +++ b/typo3/sysext/taskcenter/ext_tables.php @@ -1,18 +1,16 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'user', - 'task', - 'top', - '', - [ - 'routeTarget' => \TYPO3\CMS\Taskcenter\Controller\TaskModuleController::class . '::mainAction', - 'access' => 'group,user', - 'name' => 'user_task', - 'icon' => 'EXT:taskcenter/Resources/Public/Icons/module-taskcenter.svg', - 'labels' => 'LLL:EXT:taskcenter/Resources/Private/Language/locallang_mod.xlf' - ] - ); -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'user', + 'task', + 'top', + '', + [ + 'routeTarget' => \TYPO3\CMS\Taskcenter\Controller\TaskModuleController::class . '::mainAction', + 'access' => 'group,user', + 'name' => 'user_task', + 'icon' => 'EXT:taskcenter/Resources/Public/Icons/module-taskcenter.svg', + 'labels' => 'LLL:EXT:taskcenter/Resources/Private/Language/locallang_mod.xlf' + ] +); diff --git a/typo3/sysext/tstemplate/ext_tables.php b/typo3/sysext/tstemplate/ext_tables.php index 7eaef198b8c8..183a437a53e9 100644 --- a/typo3/sysext/tstemplate/ext_tables.php +++ b/typo3/sysext/tstemplate/ext_tables.php @@ -1,46 +1,44 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE') { - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( - 'web', - 'ts', - '', - '', - [ - 'routeTarget' => \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class . '::mainAction', - 'access' => 'admin', - 'name' => 'web_ts', - 'icon' => 'EXT:tstemplate/Resources/Public/Icons/module-tstemplate.svg', - 'labels' => 'LLL:EXT:tstemplate/Resources/Private/Language/locallang_mod.xlf' - ] - ); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( + 'web', + 'ts', + '', + '', + [ + 'routeTarget' => \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateModuleController::class . '::mainAction', + 'access' => 'admin', + 'name' => 'web_ts', + 'icon' => 'EXT:tstemplate/Resources/Public/Icons/module-tstemplate.svg', + 'labels' => 'LLL:EXT:tstemplate/Resources/Private/Language/locallang_mod.xlf' + ] +); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( - 'web_ts', - \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController::class, - null, - 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:constantEditor' - ); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( + 'web_ts', + \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController::class, + null, + 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:constantEditor' +); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( - 'web_ts', - \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController::class, - null, - 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:infoModify' - ); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( + 'web_ts', + \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController::class, + null, + 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:infoModify' +); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( - 'web_ts', - \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::class, - null, - 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:objectBrowser' - ); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( + 'web_ts', + \TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController::class, + null, + 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:objectBrowser' +); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( - 'web_ts', - \TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController::class, - null, - 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:templateAnalyzer' - ); -} +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( + 'web_ts', + \TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController::class, + null, + 'LLL:EXT:tstemplate/Resources/Private/Language/locallang.xlf:templateAnalyzer' +); diff --git a/typo3/sysext/version/ext_localconf.php b/typo3/sysext/version/ext_localconf.php index f3fdf88de5bc..758122964e94 100644 --- a/typo3/sysext/version/ext_localconf.php +++ b/typo3/sysext/version/ext_localconf.php @@ -5,11 +5,9 @@ defined('TYPO3_MODE') or die(); $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['version'] = \TYPO3\CMS\Version\Hook\DataHandlerHook::class; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass']['version'] = \TYPO3\CMS\Version\Hook\DataHandlerHook::class; -if (TYPO3_MODE === 'BE') { - // add default notification options to every page - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' - tx_version.workspaces.stageNotificationEmail.subject = LLL:EXT:version/Resources/Private/Language/locallang_emails.xlf:subject - tx_version.workspaces.stageNotificationEmail.message = LLL:EXT:version/Resources/Private/Language/locallang_emails.xlf:message - # tx_version.workspaces.stageNotificationEmail.additionalHeaders = +// add default notification options to every page +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' +tx_version.workspaces.stageNotificationEmail.subject = LLL:EXT:version/Resources/Private/Language/locallang_emails.xlf:subject +tx_version.workspaces.stageNotificationEmail.message = LLL:EXT:version/Resources/Private/Language/locallang_emails.xlf:message +# tx_version.workspaces.stageNotificationEmail.additionalHeaders = '); -} diff --git a/typo3/sysext/viewpage/ext_tables.php b/typo3/sysext/viewpage/ext_tables.php index 0642ded2fa90..0f2c778c049b 100644 --- a/typo3/sysext/viewpage/ext_tables.php +++ b/typo3/sysext/viewpage/ext_tables.php @@ -1,20 +1,18 @@ <?php defined('TYPO3_MODE') or die(); -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - // Module Web->View - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Viewpage', - 'web', - 'view', - 'after:layout', - [ - 'ViewModule' => 'show' - ], - [ - 'icon' => 'EXT:viewpage/Resources/Public/Icons/module-viewpage.svg', - 'labels' => 'LLL:EXT:viewpage/Resources/Private/Language/locallang_mod.xlf', - 'access' => 'user,group' - ] - ); -} +// Module Web->View +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Viewpage', + 'web', + 'view', + 'after:layout', + [ + 'ViewModule' => 'show' + ], + [ + 'icon' => 'EXT:viewpage/Resources/Public/Icons/module-viewpage.svg', + 'labels' => 'LLL:EXT:viewpage/Resources/Private/Language/locallang_mod.xlf', + 'access' => 'user,group' + ] +); diff --git a/typo3/sysext/workspaces/ext_localconf.php b/typo3/sysext/workspaces/ext_localconf.php index 3b119dc73b86..5797317942f2 100644 --- a/typo3/sysext/workspaces/ext_localconf.php +++ b/typo3/sysext/workspaces/ext_localconf.php @@ -33,14 +33,13 @@ if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations ]; } -if (TYPO3_MODE === 'BE') { - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'][] = \TYPO3\CMS\Workspaces\Hooks\PagetreeCollectionsProcessor::class; - $GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433114] = \TYPO3\CMS\Workspaces\Backend\ToolbarItems\WorkspaceSelectorToolbarItem::class; - - // Registers preview link icon - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)->registerIcon( - 'module-workspaces-action-preview-link', - \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, - ['source' => 'EXT:workspaces/Resources/Public/Images/generate-ws-preview-link.png'] - ); -} +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'][] = \TYPO3\CMS\Workspaces\Hooks\PagetreeCollectionsProcessor::class; + +$GLOBALS['TYPO3_CONF_VARS']['BE']['toolbarItems'][1435433114] = \TYPO3\CMS\Workspaces\Backend\ToolbarItems\WorkspaceSelectorToolbarItem::class; + +// Registers preview link icon +\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)->registerIcon( + 'module-workspaces-action-preview-link', + \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, + ['source' => 'EXT:workspaces/Resources/Public/Images/generate-ws-preview-link.png'] +); diff --git a/typo3/sysext/workspaces/ext_tables.php b/typo3/sysext/workspaces/ext_tables.php index 389edc715b2a..ba08cdda6722 100644 --- a/typo3/sysext/workspaces/ext_tables.php +++ b/typo3/sysext/workspaces/ext_tables.php @@ -1,26 +1,23 @@ <?php defined('TYPO3_MODE') or die(); -// avoid that this block is loaded in the frontend or within the upgrade-wizards -if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) { - /** Registers a Backend Module */ - \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( - 'TYPO3.CMS.Workspaces', - 'web', - 'workspaces', - 'before:info', - [ - // An array holding the controller-action-combinations that are accessible - 'Review' => 'index,fullIndex,singleIndex', - 'Preview' => 'index,newPage' - ], - [ - 'access' => 'user,group', - 'icon' => 'EXT:workspaces/Resources/Public/Icons/module-workspaces.svg', - 'labels' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_mod.xlf', - 'navigationComponentId' => 'typo3-pagetree' - ] - ); -} +// Registers the workspaces Backend Module +\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( + 'TYPO3.CMS.Workspaces', + 'web', + 'workspaces', + 'before:info', + [ + // An array holding the controller-action-combinations that are accessible + 'Review' => 'index,fullIndex,singleIndex', + 'Preview' => 'index,newPage' + ], + [ + 'access' => 'user,group', + 'icon' => 'EXT:workspaces/Resources/Public/Icons/module-workspaces.svg', + 'labels' => 'LLL:EXT:workspaces/Resources/Private/Language/locallang_mod.xlf', + 'navigationComponentId' => 'typo3-pagetree' + ] +); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_workspace_stage', 'EXT:workspaces/Resources/Private/Language/locallang_csh_sysws_stage.xlf'); -- GitLab