69eb6100490869678b8cd05af1e7838d33f301d5
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 /** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
5 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
6
7 if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
8 // FAL SECURITY CHECKS
9 $signalSlotDispatcher->connect(
10 \TYPO3\CMS\Core\Resource\ResourceFactory::class,
11 \TYPO3\CMS\Core\Resource\ResourceFactoryInterface::SIGNAL_PostProcessStorage,
12 \TYPO3\CMS\Core\Resource\Security\StoragePermissionsAspect::class,
13 'addUserPermissionsToStorage'
14 );
15 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'TYPO3\\CMS\\Core\\Resource\\Security\\FileMetadataPermissionsAspect';
16 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'][] = 'TYPO3\\CMS\\Core\\Resource\\Security\\FileMetadataPermissionsAspect->isAllowedToShowEditForm';
17 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['checkAccess'][] = 'TYPO3\\CMS\\Core\\Resource\\Security\\FileMetadataPermissionsAspect->isAllowedToShowEditForm';
18 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = 'TYPO3\\CMS\\Core\\Resource\\Security\\FileMetadataPermissionsAspect';
19
20 // PACKAGE MANAGEMENT
21 $signalSlotDispatcher->connect(
22 'PackageManagement',
23 'packagesMayHaveChanged',
24 \TYPO3\CMS\Core\Package\PackageManager::class,
25 'scanAvailablePackages'
26 );
27 }
28
29 $signalSlotDispatcher->connect(
30 \TYPO3\CMS\Core\Resource\ResourceStorage::class,
31 \TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileDelete,
32 \TYPO3\CMS\Core\Resource\Processing\FileDeletionAspect::class,
33 'removeFromRepository'
34 );
35
36 $signalSlotDispatcher->connect(
37 \TYPO3\CMS\Core\Resource\ResourceStorage::class,
38 \TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileAdd,
39 \TYPO3\CMS\Core\Resource\Processing\FileDeletionAspect::class,
40 'cleanupProcessedFilesPostFileAdd'
41 );
42
43 $signalSlotDispatcher->connect(
44 \TYPO3\CMS\Core\Resource\ResourceStorage::class,
45 \TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileReplace,
46 \TYPO3\CMS\Core\Resource\Processing\FileDeletionAspect::class,
47 'cleanupProcessedFilesPostFileReplace'
48 );
49
50 if (!\TYPO3\CMS\Core\Core\Bootstrap::usesComposerClassLoading()) {
51 $signalSlotDispatcher->connect(
52 \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService::class,
53 'hasInstalledExtensions',
54 \TYPO3\CMS\Core\Core\ClassLoadingInformation::class,
55 'writeClassLoadingInformation'
56 );
57 $signalSlotDispatcher->connect(
58 \TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
59 'afterExtensionUninstall',
60 \TYPO3\CMS\Core\Core\ClassLoadingInformation::class,
61 'writeClassLoadingInformation'
62 );
63 }
64
65 unset($signalSlotDispatcher);
66
67 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['dumpFile'] = 'EXT:core/Resources/PHP/FileDumpEID.php';
68
69 /** @var \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry $rendererRegistry */
70 $rendererRegistry = \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::getInstance();
71 $rendererRegistry->registerRendererClass(\TYPO3\CMS\Core\Resource\Rendering\AudioTagRenderer::class);
72 $rendererRegistry->registerRendererClass(\TYPO3\CMS\Core\Resource\Rendering\VideoTagRenderer::class);
73
74 $textExtractorRegistry = \TYPO3\CMS\Core\Resource\TextExtraction\TextExtractorRegistry::getInstance();
75 $textExtractorRegistry->registerTextExtractor(\TYPO3\CMS\Core\Resource\TextExtraction\PlainTextExtractor::class);