-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathext_localconf.php
More file actions
118 lines (107 loc) · 3.59 KB
/
Copy pathext_localconf.php
File metadata and controls
118 lines (107 loc) · 3.59 KB
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
<?php
defined('TYPO3') or die();
use Extcode\CartProducts\Controller\ProductController;
use Extcode\CartProducts\Hooks\DataHandler;
use Extcode\CartProducts\Hooks\DatamapDataHandlerHook;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
(static function (string $extKey): void {
$_LLL_be = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_be.xlf:';
if (is_array($GLOBALS['TYPO3_CONF_VARS'] ?? null) === false) {
throw new \Exception('$GLOBALS[\'TYPO3_CONF_VARS\'] is not an array', 1774601240);
}
ArrayUtility::mergeRecursiveWithOverrule(
$GLOBALS['TYPO3_CONF_VARS'],
[
'EXT' => [
$extKey => [
'templateLayouts' => [
'list_products' => [
'table' => [$_LLL_be . 'flexforms_template.templateLayout.table', 'table'],
'grid' => [$_LLL_be . 'flexforms_template.templateLayout.grid', 'grid'],
],
'teaser_products' => [
'table' => [$_LLL_be . 'flexforms_template.templateLayout.table', 'table'],
'grid' => [$_LLL_be . 'flexforms_template.templateLayout.grid', 'grid'],
],
],
],
],
'SC_OPTIONS' => [
't3lib/class.t3lib_tcemain.php' => [
'processDatamapClass' => [
'cartproducts_allowed' => DatamapDataHandlerHook::class,
],
'clearCachePostProc' => [
'cartproducts_clearcache' => DataHandler::class . '->clearCachePostProc',
],
],
],
'SYS' => [
'fluid' => [
'namespaces' => [
'cartproducts' => [
1 => 'Extcode\\CartProducts\\ViewHelpers',
],
],
],
],
]
);
// configure plugins
ExtensionUtility::configurePlugin(
'cart_products',
'ShowProduct',
[
ProductController::class => 'show, showForm',
],
[
ProductController::class => 'showForm',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'cart_products',
'ListProducts',
[
ProductController::class => 'list, show, showForm',
],
[
ProductController::class => 'showForm',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'cart_products',
'TeaserProducts',
[
ProductController::class => 'teaser, showForm',
],
[
ProductController::class => 'showForm',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'cart_products',
'SingleProduct',
[
ProductController::class => 'show, showForm',
],
[
ProductController::class => 'showForm',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'cart_products',
'ProductPartial',
[
ProductController::class => 'showForm',
],
[
ProductController::class => 'showForm',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
})('cart_products');