-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathext_tables.php
78 lines (69 loc) · 2.57 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
<?php
if (!defined('TYPO3')) {
die('Access denied.');
}
// typo3 v11 modules initialization
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
$conf = $extensionConfiguration->get('recordsmanager');
if (((int)$conf['enabledAdd'] === 1) || ((int)$conf['enabledEdit'] === 1) || ((int)$conf['enabledExport'] === 1)) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Recordsmanager',
'txrecordsmanagerM1',
'',
'',
[],
[
'access' => 'user,group',
'icon' => 'EXT:recordsmanager/Resources/Public/Icons/table.png',
'labels' => 'LLL:EXT:recordsmanager/Resources/Private/Language/locallang.xlf:recordsmanagertitle',
]
);
if ((int)$conf['enabledAdd'] === 1) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Recordsmanager',
'txrecordsmanagerM1',
'insert',
'',
[
\Sng\Recordsmanager\Controller\InsertController::class => 'index',
],
[
'access' => 'user,group',
'icon' => 'EXT:recordsmanager/Resources/Public/Icons/plus.png',
'labels' => 'LLL:EXT:recordsmanager/Resources/Private/Language/locallang.xlf:inserttitle',
]
);
}
if ((int)$conf['enabledEdit'] === 1) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Recordsmanager',
'txrecordsmanagerM1',
'edit',
'',
[
\Sng\Recordsmanager\Controller\EditController::class => 'index',
],
[
'access' => 'user,group',
'icon' => 'EXT:recordsmanager/Resources/Public/Icons/table-edit.png',
'labels' => 'LLL:EXT:recordsmanager/Resources/Private/Language/locallang.xlf:edittitle',
]
);
}
if ((int)$conf['enabledExport'] === 1) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Recordsmanager',
'txrecordsmanagerM1',
'export',
'',
[
\Sng\Recordsmanager\Controller\ExportController::class => 'index',
],
[
'access' => 'user,group',
'icon' => 'EXT:recordsmanager/Resources/Public/Icons/export.png',
'labels' => 'LLL:EXT:recordsmanager/Resources/Private/Language/locallang.xlf:exporttitle',
]
);
}
}