forked from in2code-de/lux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
115 lines (112 loc) · 4.91 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
<?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-module',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:lux/Resources/Public/Icons/lux_white.svg']
);
$iconRegistry->registerIcon(
'extension-lux',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:lux/Resources/Public/Icons/lux.svg']
);
$iconRegistry->registerIcon(
'extension-lux-turquoise',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:lux/Resources/Public/Icons/Extension.svg']
);
/**
* Include Modules
*/
// Add Main module "LUX".
// Acces to a main module is implicit, as soon as a user has access to at least one of its submodules.
if (\In2code\Lux\Utility\ConfigurationUtility::isAnalysisModuleDisabled() === false
|| \In2code\Lux\Utility\ConfigurationUtility::isWorkflowModuleDisabled() === false) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
'lux',
'',
'',
null,
[
'name' => 'lux',
'labels' => 'LLL:EXT:lux/Resources/Private/Language/locallang_mod.xlf',
'iconIdentifier' => 'extension-lux-module'
]
);
}
// Add module for analysis
if (\In2code\Lux\Utility\ConfigurationUtility::isAnalysisModuleDisabled() === false) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Lux',
'lux',
'analysis',
'',
[
\In2code\Lux\Controller\AnalysisController::class =>
'dashboard,content,news,linkListener,search,deleteLinkListener,detailPage' .
',detailNews,detailSearch,detailDownload,detailLinkListener,resetFilter',
\In2code\Lux\Controller\LeadController::class =>
'dashboard,list,detail,downloadCsv,remove,deactivate,resetFilter',
\In2code\Lux\Controller\GeneralController::class => 'information'
],
[
'access' => 'user,group',
'icon' => 'EXT:lux/Resources/Public/Icons/lux_module_analysis.svg',
'labels' => 'LLL:EXT:lux/Resources/Private/Language/locallang_mod_analysis.xlf',
]
);
}
// Add module for leads
if (\In2code\Lux\Utility\ConfigurationUtility::isLeadModuleDisabled() === false) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Lux',
'lux',
'leads',
'',
[
\In2code\Lux\Controller\LeadController::class =>
'dashboard,list,detail,downloadCsv,remove,deactivate,resetFilter',
\In2code\Lux\Controller\AnalysisController::class =>
'dashboard,content,linkClicks,detailPage,detailDownload,resetFilter',
\In2code\Lux\Controller\GeneralController::class => 'information'
],
[
'access' => 'user,group',
'icon' => 'EXT:lux/Resources/Public/Icons/lux_module_lead.svg',
'labels' => 'LLL:EXT:lux/Resources/Private/Language/locallang_mod_lead.xlf',
]
);
}
// Add module for campaigns
if (\In2code\Lux\Utility\ConfigurationUtility::isWorkflowModuleDisabled() === false) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Lux',
'lux',
'workflow',
'',
[
\In2code\Lux\Controller\WorkflowController::class =>
'list,new,create,edit,update,delete,disable,enable,resetFilter',
\In2code\Lux\Controller\ShortenerController::class => 'list,delete,detail,resetFilter,qr',
\In2code\Lux\Controller\AbTestingController::class => 'list',
\In2code\Lux\Controller\GeneralController::class => 'information'
],
[
'access' => 'user,group',
'icon' => 'EXT:lux/Resources/Public/Icons/lux_module_workflow.svg',
'labels' => 'LLL:EXT:lux/Resources/Private/Language/locallang_mod_workflow.xlf',
]
);
}
}
);