Repository navigation
Expand file tree
/
Copy pathext_localconf.php
More file actions
53 lines (45 loc) · 2.59 KB
/
Copy pathext_localconf.php
File metadata and controls
53 lines (45 loc) · 2.59 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
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
'google_cloud_storage',
'setup',
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:google_cloud_storage/Configuration/TypoScript/setup.typoscript">'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Visol.GoogleCloudStorage',
'Cache',
[
'GoogleCloudStorageTypo3CacheManager' => 'flush',
],
// non-cacheable actions
[
'GoogleCloudStorageTypo3CacheManager' => 'flush',
]
);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['registeredDrivers'][\Visol\GoogleCloudStorage\Driver\GoogleCloudStorageDriver::DRIVER_TYPE] = [
'class' => \Visol\GoogleCloudStorage\Driver\GoogleCloudStorageDriver::class,
'flexFormDS' => 'FILE:EXT:google_cloud_storage/Configuration/FlexForm/GoogleCloudStorageFlexForm.xml',
'label' => 'Google Cloud Storage',
'shortName' => \Visol\GoogleCloudStorage\Driver\GoogleCloudStorageDriver::DRIVER_TYPE,
];
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Visol']['GoogleCloudStorage']['Cache']['writerConfiguration'] =
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Visol']['GoogleCloudStorage']['Driver']['writerConfiguration'] = [
// configuration for WARNING severity, including all
// levels with higher severity (ERROR, CRITICAL, EMERGENCY)
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
// configuration for the writer
'logFile' => 'typo3temp/var/logs/google-cloud-storage.log'
],
],
];
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['google_cloud_storage'])) {
// cache configuration, see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/CachingFramework/Configuration/Index.html#cache-configurations
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['google_cloud_storage']['frontend'] = \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['google_cloud_storage']['groups'] = ['all', 'google_cloud_storage'];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['google_cloud_storage']['options']['defaultLifetime'] = 2592000;
}
}
);