-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
39 lines (33 loc) · 1.22 KB
/
ext_localconf.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
<?php
use HDNET\CdnFastly\Cache\FastlyBackend;
use HDNET\CdnFastly\Hooks\FastlyClearCache;
use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\Container\Container;
defined('TYPO3') || die();
$boot = static function (
Container $container
): void {
if (empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['CdnFastly'] ?? null)) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['CdnFastly'] = [
'backend' => FastlyBackend::class,
'groups' => [
'fastly'
],
];
}
if (TYPO3_MODE === 'BE') {
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
$iconRegistry->registerIcon(
'extension-cdn_fastly-clearcache',
BitmapIconProvider::class,
['source' => 'EXT:cdn_fastly/Resources/Public/Icons/Cache/FastlyClearCache.png']
);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'][] = FastlyClearCache::class;
}
};
$boot(
GeneralUtility::makeInstance(Container::class)
);
unset($boot);