forked from websedit/we_cookie_consent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
executable file
·62 lines (55 loc) · 2.2 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
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function () {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Websedit.WeCookieConsent',
'Pi1',
[
'Consent' => 'consent, list',
],
[
'Consent' => '',
]
);
if (TYPO3_MODE === 'BE') {
/**
* 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'
]
);
//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=01_WEID=IDs
# customsubcategory=02_WETEMPLATE=Template
# customsubcategory=03_WEOTHER=Other
');
}
);