[TASK] Do not set GeneralUtility::$container in unit tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / ext_localconf.php
1 <?php
2
3 defined('TYPO3_MODE') or die();
4
5 /** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
6 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
7
8 // PACKAGE MANAGEMENT
9 $signalSlotDispatcher->connect(
10 'PackageManagement',
11 'packagesMayHaveChanged',
12 \TYPO3\CMS\Core\Package\PackageManager::class,
13 'scanAvailablePackages'
14 );
15
16 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class;
17 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Hooks\BackendUserGroupIntegrityCheck::class;
18 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Hooks\BackendUserPasswordCheck::class;
19 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class . '->isAllowedToShowEditForm';
20 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['checkAccess'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class . '->isAllowedToShowEditForm';
21 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = \TYPO3\CMS\Core\Resource\Security\FileMetadataPermissionsAspect::class;
22 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Hooks\DestroySessionHook::class;
23 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Core\Hooks\PagesTsConfigGuard::class;
24 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][\TYPO3\CMS\Core\Hooks\CreateSiteConfiguration::class] = \TYPO3\CMS\Core\Hooks\CreateSiteConfiguration::class;
25
26 if (!\TYPO3\CMS\Core\Core\Environment::isComposerMode()) {
27 $signalSlotDispatcher->connect(
28 \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
29 'afterExtensionInstall',
30 \TYPO3\CMS\Core\Core\ClassLoadingInformation::class,
31 'dumpClassLoadingInformation'
32 );
33 $signalSlotDispatcher->connect(
34 \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
35 'afterExtensionUninstall',
36 \TYPO3\CMS\Core\Core\ClassLoadingInformation::class,
37 'dumpClassLoadingInformation'
38 );
39 }
40
41 unset($signalSlotDispatcher);
42
43 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['dumpFile'] = \TYPO3\CMS\Core\Controller\FileDumpController::class . '::dumpAction';
44 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['requirejs'] = \TYPO3\CMS\Core\Controller\RequireJsController::class . '::retrieveConfiguration';
45
46 /** @var \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry $rendererRegistry */
47 $rendererRegistry = \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::getInstance();
48 $rendererRegistry->registerRendererClass(\TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::class);
49 $rendererRegistry->registerRendererClass(\TYPO3\CMS\Core\Resource\Rendering\VideoTagRenderer::class);
50 $rendererRegistry->registerRendererClass(\TYPO3\CMS\Core\Resource\Rendering\YouTubeRenderer::class);
51 $rendererRegistry->registerRendererClass(\TYPO3\CMS\Core\Resource\Rendering\VimeoRenderer::class);
52 unset($rendererRegistry);
53
54 $textExtractorRegistry = \TYPO3\CMS\Core\Resource\TextExtraction\TextExtractorRegistry::getInstance();
55 $textExtractorRegistry->registerTextExtractor(\TYPO3\CMS\Core\Resource\TextExtraction\PlainTextExtractor::class);
56 unset($textExtractorRegistry);
57
58 $extractorRegistry = \TYPO3\CMS\Core\Resource\Index\ExtractorRegistry::getInstance();
59 $extractorRegistry->registerExtractionService(\TYPO3\CMS\Core\Resource\OnlineMedia\Metadata\Extractor::class);
60 unset($extractorRegistry);
61
62 // Register base authentication service
63 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
64 'core',
65 'auth',
66 \TYPO3\CMS\Core\Authentication\AuthenticationService::class,
67 [
68 'title' => 'User authentication',
69 'description' => 'Authentication with username/password.',
70 'subtype' => 'getUserBE,getUserFE,authUserBE,authUserFE,getGroupsFE,processLoginDataBE,processLoginDataFE',
71 'available' => true,
72 'priority' => 50,
73 'quality' => 50,
74 'os' => '',
75 'exec' => '',
76 'className' => TYPO3\CMS\Core\Authentication\AuthenticationService::class
77 ]
78 );
79
80 // add default notification options to every page
81 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
82 'TCEMAIN.translateToMessage = Translate to %s:'
83 );
84
85 $metaTagManagerRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry::class);
86 $metaTagManagerRegistry->registerManager(
87 'html5',
88 \TYPO3\CMS\Core\MetaTag\Html5MetaTagManager::class
89 );
90 $metaTagManagerRegistry->registerManager(
91 'edge',
92 \TYPO3\CMS\Core\MetaTag\EdgeMetaTagManager::class
93 );
94 unset($metaTagManagerRegistry);
95
96 // Add module configuration
97 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
98 'config.pageTitleProviders.record.provider = TYPO3\CMS\Core\PageTitle\RecordPageTitleProvider'
99 );