forked from evoWeb/sf_register
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
executable file
·60 lines (54 loc) · 2.12 KB
/
ext_tables.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
defined('TYPO3_MODE') or die();
/** @noinspection PhpUndefinedVariableInspection */
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
switch ($extensionConfiguration['typoscriptComplexity']) {
case 'maximal':
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$_EXTKEY,
'Configuration/TypoScript/maximal/',
'Feuser Register [maximal]'
);
break;
case 'minimal':
// fall through intended
default:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$_EXTKEY,
'Configuration/TypoScript/minimal/',
'Feuser Register [minimal]'
);
}
/**
* Page TypoScript for mod wizards
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TsConfig/ModWizards.ts">'
);
try {
/**
* Cache manager
*
* @var \TYPO3\CMS\Core\Cache\CacheManager $cacheManager
*/
$cacheManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class);
// Reflection cache
if (!$cacheManager->hasCache(SFREGISTERCACHEIDENTIFIER)) {
/**
* TYPO3 cache factory
*
* @var \TYPO3\CMS\Core\Cache\CacheFactory $typo3CacheFactory
*/
$typo3CacheFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Cache\CacheFactory::class
);
$typo3CacheFactory->create(
SFREGISTERCACHEIDENTIFIER,
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][SFREGISTERCACHEIDENTIFIER]['frontend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][SFREGISTERCACHEIDENTIFIER]['backend'],
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][SFREGISTERCACHEIDENTIFIER]['options']
);
}
} catch (Exception $exeption) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Can not create cache ' . SFREGISTERCACHEIDENTIFIER, $_EXTKEY, 2);
}