-
Notifications
You must be signed in to change notification settings - Fork 16
/
ext_localconf.php
executable file
·89 lines (79 loc) · 3.4 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
defined('TYPO3') || die('Access denied.');
call_user_func(
function () {
$rendererRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::class);
$rendererRegistry->registerRendererClass(\Websedit\WeCookieConsent\Resource\Rendering\YouTubeRenderer::class);
$rendererRegistry->registerRendererClass(\Websedit\WeCookieConsent\Resource\Rendering\VimeoRenderer::class);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'WeCookieConsent',
'Pi1',
[
\Websedit\WeCookieConsent\Controller\ConsentController::class => 'consent',
],
[
\Websedit\WeCookieConsent\Controller\ConsentController::class => '',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'WeCookieConsent',
'Pi2',
[
\Websedit\WeCookieConsent\Controller\ConsentController::class => 'list',
],
[
\Websedit\WeCookieConsent\Controller\ConsentController::class => '',
]
);
/**
* Hooks
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \Websedit\WeCookieConsent\Hook\AfterSaveHook::class;
/**
* Icons
*/
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
//New Content Element Wizard Icon
$iconRegistry->registerIcon(
'we_cookie_consent-plugin-pi1',
$iconRegistry->detectIconProvider('user_plugin_pi1.svg'),
[
'source' => 'EXT:we_cookie_consent/Resources/Public/Icons/user_plugin_pi1.svg'
]
);
//Backendmodul Icon
$iconRegistry->registerIcon(
'we_cookie_consent-mod-mod1',
$iconRegistry->detectIconProvider('user_mod_mod1.svg'),
[
'source' => 'EXT:we_cookie_consent/Resources/Public/Icons/user_mod_mod1.svg'
]
);
//SysFolder Icon
$iconRegistry->registerIcon(
'pagetree-folder-contains-cookies',
$iconRegistry->detectIconProvider('sysfolder.png'),
[
'source' => 'EXT:we_cookie_consent/Resources/Public/Icons/sysfolder.png'
]
);
/**
* ContentElementWizard for Pi1
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:we_cookie_consent/Configuration/TSConfig/ContentElementWizard.typoscript">'
);
// Workaround to define custom subcategories in constants editor. Doesn't work in constants.ts
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('
# customcategory=plugin.tx_wecookieconsent_pi1=Websedit Cookie Consent
# customsubcategory=10_WETEST=Testing
# customsubcategory=20_WEID=IDs
# customsubcategory=30_WETEMPLATE=Template
# customsubcategory=40_BEHAVIOUR=Behaviour
# customsubcategory=50_TOGGLE=Toggles
# customsubcategory=60_STORAGE=Storage
# customsubcategory=70_WEOTHER=Other
# customsubcategory=80_WECONSENTMODE=ConsentMode
');
}
);