-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
60 lines (55 loc) · 2.31 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
defined('TYPO3') or die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
call_user_func(
function($extKey)
{
if (isset($GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'])) {
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'freecapSet';
} else {
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'] = ['freecapSet'];
}
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'formatName';
// GDlib is a requirement for the Font Maker module
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] ?? false) {
// Add module configuration setup
ExtensionManagementUtility::addTypoScript($extKey, 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . '/Configuration/TypoScript/FontMaker/setup.typoscript">');
}
$extensionName = GeneralUtility::underscoredToUpperCamelCase($extKey);
// Configuring the captcha image generator
ExtensionUtility::configurePlugin(
// The extension name (in UpperCamelCase) or the extension key (in lower_underscore)
$extensionName,
// A unique name of the plugin in UpperCamelCase
'ImageGenerator',
// An array holding the controller-action-combinations that are accessible
[
// The first controller and its first action will be the default
\SJBR\SrFreecap\Controller\ImageGeneratorController::class => 'show',
],
// An array of non-cachable controller-action-combinations (they must already be enabled)
[
\SJBR\SrFreecap\Controller\ImageGeneratorController::class => 'show',
]
);
// Configuring the audio captcha player
ExtensionUtility::configurePlugin(
// The extension name (in UpperCamelCase) or the extension key (in lower_underscore)
$extensionName,
// A unique name of the plugin in UpperCamelCase
'AudioPlayer',
// An array holding the controller-action-combinations that are accessible
[
// The first controller and its first action will be the default
\SJBR\SrFreecap\Controller\AudioPlayerController::class => 'play',
],
// An array of non-cachable controller-action-combinations (they must already be enabled)
[
\SJBR\SrFreecap\Controller\AudioPlayerController::class => 'play',
]
);
},
'sr_freecap'
);