forked from extcode/cart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
74 lines (67 loc) · 2.1 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
<?php
defined('TYPO3_MODE') or die();
$iconPath = 'EXT:cart/Resources/Public/Icons/';
$_LLL_db = 'LLL:EXT:cart/Resources/Private/Language/locallang_db.xlf:';
/**
* Register Backend Modules
*/
if (TYPO3_MODE === 'BE') {
if (!isset($TBE_MODULES['Cart'])) {
$temp_TBE_MODULES = [];
foreach ($TBE_MODULES as $key => $val) {
if ($key == 'file') {
$temp_TBE_MODULES[$key] = $val;
$temp_TBE_MODULES['Cart'] = '';
} else {
$temp_TBE_MODULES[$key] = $val;
}
}
$TBE_MODULES = $temp_TBE_MODULES;
}
// add Main Module
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Extcode.cart',
'Cart',
'',
'',
[],
[
'access' => 'user, group',
'icon' => $iconPath . 'module.svg',
'labels' => $_LLL_db . 'tx_cart.module.main',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Extcode.cart',
'Cart',
'Orders',
'',
[
'Backend\Order\Order' => 'list, export, show, generateNumber, generatePdfDocument, downloadPdfDocument',
'Backend\Order\Payment' => 'update',
'Backend\Order\Shipping' => 'update',
'Backend\Order\Document' => 'download, create',
],
[
'access' => 'user, group',
'icon' => $iconPath . 'module_orders.svg',
'labels' => $_LLL_db . 'tx_cart.module.orders',
'navigationComponentId' => 'TYPO3/CMS/Backend/PageTree/PageTreeElement',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Extcode.cart',
'Cart',
'OrderStatistics',
'',
[
'Backend\Statistic' => 'show',
],
[
'access' => 'user, group',
'icon' => $iconPath . 'module_order_statistics.svg',
'labels' => $_LLL_db . 'tx_cart.module.order_statistics',
'navigationComponentId' => 'TYPO3/CMS/Backend/PageTree/PageTreeElement',
]
);
}