forked from mindshape-GmbH/mindshape_cookie_consent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_tables.php
More file actions
69 lines (57 loc) · 3.92 KB
/
Copy pathext_tables.php
File metadata and controls
69 lines (57 loc) · 3.92 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '/Configuration/TSconfig/ContentElementWizard.typoscript">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mindshapecookieconsent_domain_model_configuration');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mindshapecookieconsent_domain_model_cookiecategory');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_mindshapecookieconsent_domain_model_cookieoption');
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
\Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '-plugin-consent-icon',
\TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
['name' => 'pie-chart']
);
$iconRegistry->registerIcon(
\Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '-plugin-cookielist-icon',
\TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
['name' => 'list']
);
$iconRegistry->registerIcon(
'module-' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '/ext_icon.svg']
);
$iconRegistry->registerIcon(
'module-' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME . '-statistic',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '/Resources/Public/Icons/module_statistic.png']
);
$webModuleIndex = array_search('web', array_keys($GLOBALS['TBE_MODULES'])) + 1;
$modulesStart = array_slice($GLOBALS['TBE_MODULES'], 0, $webModuleIndex, true);
$modulesEnd = array_slice($GLOBALS['TBE_MODULES'], $webModuleIndex, null, true);
$GLOBALS['TBE_MODULES'] = $modulesStart;
$GLOBALS['TBE_MODULES'] += [\Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME => ''];
$GLOBALS['TBE_MODULES'] += $modulesEnd;
$GLOBALS['TBE_MODULES']['_configuration'][\Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME] = [
'labels' => 'LLL:EXT:' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '/Resources/Private/Language/module_locallang.xlf',
'name' => \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME,
'workspaces' => 'online',
'iconIdentifier' => 'module-' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME,
];
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Mindshape.MindshapeCookieConsent',
\Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME,
'statistic',
'',
[
'Backend\\Statistic' => 'statisticButtons,statisticCategories,statisticOptions',
],
[
'access' => 'user,group',
'iconIdentifier' => 'module-' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_NAME . '-statistic',
'labels' => 'LLL:EXT:' . \Mindshape\MindshapeCookieConsent\Utility\SettingsUtility::EXTENSION_KEY . '/Resources/Private/Language/module_statistic_locallang.xlf',
]
);
}
);