forked from romm/TYPO3-Site-Factory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
executable file
·40 lines (36 loc) · 1.97 KB
/
ext_localconf.php
File metadata and controls
executable file
·40 lines (36 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
if (!defined('TYPO3_MODE')) {
throw new \Exception('Access denied.');
}
call_user_func(
function ($extensionKey) {
if (TYPO3_MODE == 'BE') {
// Registering the caches for this extension.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_' . $extensionKey . '_main'] = [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\SimpleFileBackend',
'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend',
'groups' => ['all', 'system', 'pages']
];
// Registering the caches for this extension.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_' . $extensionKey . '_processed'] = [
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\SimpleFileBackend',
'frontend' => 'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend',
'options' => [
'cacheDirectory' => \TYPO3\CMS\Core\Core\Environment::getPublicPath() . "/" . Romm\SiteFactory\Core\Core::getProcessedFolderPath()
]
];
// Including main TypoScript files.
$includeTypoScriptSyntax = '<INCLUDE_TYPOSCRIPT: source="FILE:%s">';
$typoScriptFiles = [
'EXT:' . $extensionKey . '/Configuration/TypoScript/Default/DefaultConfiguration.typoscript',
'EXT:' . $extensionKey . '/Configuration/TypoScript/Default/FieldsTypesConfiguration.typoscript',
'EXT:' . $extensionKey . '/Configuration/TypoScript/Default/FieldsConfiguration.typoscript',
'EXT:' . $extensionKey . '/Configuration/TypoScript/Default/DuplicationConfiguration.typoscript'
];
foreach ($typoScriptFiles as $filePath) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(sprintf($includeTypoScriptSyntax, $filePath));
}
}
},
$_EXTKEY
);