-
Notifications
You must be signed in to change notification settings - Fork 25
/
ext_tables.php
125 lines (120 loc) · 5.05 KB
/
ext_tables.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
call_user_func(
function () {
/**
* Register Icons
*/
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
$iconRegistry->registerIcon(
'extension-lux',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/lux.svg']
);
$iconRegistry->registerIcon(
'extension-luxletter',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/Extension.svg']
);
$iconRegistry->registerIcon(
'extension-lux-module',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/lux_white.svg']
);
$iconRegistry->registerIcon(
'extension-luxletter-module',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/lux_module_newsletter.svg']
);
$iconRegistry->registerIcon(
'extension-luxletter-star',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/star.svg']
);
$iconRegistry->registerIcon(
'teaser',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/ctype-teaser.svg']
);
$iconRegistry->registerIcon(
'luxletter-widget-receiver',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/widget_receiver.svg']
);
$iconRegistry->registerIcon(
'luxletter-widget-newsletter',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/widget_newsletter.svg']
);
$iconRegistry->registerIcon(
'apps-pagetree-luxletter',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/luxletter_doktype.svg']
);
$iconRegistry->registerIcon(
'apps-pagetree-luxletter-contentFromPid',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:luxletter/Resources/Public/Icons/luxletter_doktype.svg']
);
/**
* Include Modules
*/
// Add Main module "LUX" - shared with EXT:lux and EXT:luxenterprise (if installed)
// Acces to a main module is implicit, as soon as a user has access to at least one of its submodules.
// Todo: Can be removed, if TYPO3 11 support is dropped
if (empty($GLOBALS['TBE_MODULES']['lux'])) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'lux',
'',
'',
null,
[
'name' => 'lux',
'labels' => 'LLL:EXT:luxletter/Resources/Private/Language/locallang_mod.xlf',
'iconIdentifier' => 'extension-lux-module'
]
);
}
// Add module for analysis
// Todo: Can be removed, if TYPO3 11 support is dropped
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Luxletter',
'lux',
'luxletter',
'',
[
\In2code\Luxletter\Controller\NewsletterController::class =>
'dashboard, list, resetFilter, edit, update, new, create, enable, disable, delete, receiver',
],
[
'access' => 'user,group',
'icon' => 'EXT:luxletter/Resources/Public/Icons/lux_module_newsletter.svg',
'labels' => 'LLL:EXT:luxletter/Resources/Private/Language/locallang_mod_newsletter.xlf',
]
);
/**
* Add static page TSconfig
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'@import "EXT:luxletter/Configuration/PageTSConfig/ContentElements.typoscript"'
);
/**
* Add new page doktype
*/
if (\In2code\Luxletter\Utility\ConfigurationUtility::isMultiLanguageModeActivated()) {
$doktype = \In2code\Luxletter\Utility\ConfigurationUtility::getMultilanguageNewsletterPageDoktype();
$GLOBALS['PAGES_TYPES'][$doktype] = [
'type' => 'web',
'allowedTables' => '*',
];
// Allow backend users to drag and drop the new page type:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $doktype . ')'
);
}
}
);