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