forked from extcode/cart_events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
146 lines (117 loc) · 5.43 KB
/
ext_localconf.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
defined('TYPO3_MODE') or die();
$_LLL_be = 'LLL:EXT:cart_events/Resources/Private/Language/locallang_be.xlf:';
// configure plugins
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Extcode.cart_events',
'Events',
[
'Event' => 'show, list, form',
],
[
'Event' => 'form',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Extcode.cart_events',
'TeaserEvents',
[
'Event' => 'teaser',
],
[
'Event' => '',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Extcode.cart_events',
'SingleEvent',
[
'Event' => 'show, form',
],
[
'Event' => 'form',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Extcode.cart_events',
'EventDates',
[
'EventDate' => 'list',
],
[
'EventDate' => '',
]
);
// Icon Registry
if (TYPO3_MODE === 'BE') {
$icons = [
'apps-pagetree-folder-cartevents-events' => 'apps_pagetree_folder_cartevents_events.svg',
'apps-pagetree-page-cartevents-events' => 'apps_pagetree_page_cartevents_events.svg',
'ext-cartevents-wizard-icon' => 'cartevents_plugin_wizard.svg',
];
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
foreach ($icons as $identifier => $fileName) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
[
'source' => 'EXT:cart_events/Resources/Public/Icons/' . $fileName,
]
);
}
}
// TSconfig
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:cart_events/Configuration/TSconfig/ContentElementWizard.tsconfig">
');
// Cart Hooks
if (TYPO3_MODE === 'FE') {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cart']['CartEvents']['Cart']['AddToCartFinisher'] =
\Extcode\CartEvents\Domain\Finisher\Cart\AddToCartFinisher::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cart']['CartEvents']['Form']['AddToCartFinisher'] =
\Extcode\CartEvents\Domain\Finisher\Form\AddToCartFinisher::class;
}
// ke_search Hook - register indexer for events
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerIndexerConfiguration'][] =
\Extcode\CartEvents\Hooks\KeSearchEventsIndexer::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['customIndexer'][] =
\Extcode\CartEvents\Hooks\KeSearchEventsIndexer::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerIndexerConfiguration'][] =
\Extcode\CartEvents\Hooks\KeSearchSingleEventIndexer::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['customIndexer'][] =
\Extcode\CartEvents\Hooks\KeSearchSingleEventIndexer::class;
// processDatamapClass Hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['cartevents_allowed'] =
\Extcode\CartEvents\Hooks\DatamapDataHandlerHook::class;
// clearCachePostProc Hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['cartevents_clearcache'] =
\Extcode\CartEvents\Hooks\DataHandler::class . '->clearCachePostProc';
// Signal Slots
$dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);
$dispatcher->connect(
\Extcode\Cart\Utility\StockUtility::class,
'handleStock',
\Extcode\CartEvents\Utility\StockUtility::class,
'handleStock'
);
// register "cartevents:" namespace
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['cartevents'][]
= 'Extcode\\CartEvents\\ViewHelpers';
// update wizard for slugs
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['cartEventsSlugUpdater'] =
\Extcode\CartEvents\Updates\SlugUpdater::class;
// translation overrides
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:cart/Resources/Private/Language/locallang.xlf'][] = 'EXT:cart_events/Resources/Private/Language/Overrides/cart/locallang.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['de']['EXT:cart/Resources/Private/Language/de.locallang.xlf'][] = 'EXT:cart_events/Resources/Private/Language/Overrides/cart/de.locallang.xlf';
// register listTemplateLayouts
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['events'][] = [$_LLL_be . 'flexforms_template.templateLayout.events.table', 'table'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['events'][] = [$_LLL_be . 'flexforms_template.templateLayout.events.grid', 'grid'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['teaser_events'][] = [$_LLL_be . 'flexforms_template.templateLayout.events.table', 'table'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['teaser_events'][] = [$_LLL_be . 'flexforms_template.templateLayout.events.grid', 'grid'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['event_dates'][] = [$_LLL_be . 'flexforms_template.templateLayout.event_dates.table', 'table'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['event_dates'][] = [$_LLL_be . 'flexforms_template.templateLayout.event_dates.grid', 'grid'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['cart_events']['templateLayouts']['single_event'][] = [$_LLL_be . 'flexforms_template.templateLayout.single_event.default', 'default'];