-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
214 lines (183 loc) · 7.06 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?php
use TYPO3\CMS\Backend\Form\Container\InlineRecordContainer;
use TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew;
use TYPO3\CMS\Core\Cache\Backend\FileBackend;
use TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend;
use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use WapplerSystems\Address\Backend\Form\Element\MapElement;
use WapplerSystems\Address\Backend\FormDataProvider\AddressRowInitializeNew;
use WapplerSystems\Address\Command\AddressImportCommandController;
use WapplerSystems\Address\Controller\AddressController;
use WapplerSystems\Address\Controller\CategoryController;
use WapplerSystems\Address\Controller\TagController;
use WapplerSystems\Address\Extbase\Persistence\Generic\Storage\Typo3DbQueryParserForAddress;
use WapplerSystems\Address\Hooks\DataHandler;
use WapplerSystems\Address\Hooks\Form\AddressHook;
use WapplerSystems\Address\Hooks\InlineElementHook;
use WapplerSystems\Address\Utility\ClassCacheManager;
use WapplerSystems\Address\Utility\ClassLoader;
use WapplerSystems\Address\Xclass\InlineRecordContainerForAddress;
$boot = static function (): void {
ExtensionUtility::configurePlugin(
'Address',
'ListAndDetail',
[
AddressController::class => 'list,detail',
],
[],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'Address',
'List',
[
AddressController::class => 'list',
],
[],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'Address',
'Detail',
[
AddressController::class => 'detail',
],
[],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'Address',
'SearchForm',
[
AddressController::class => 'searchForm',
],
[
AddressController::class => 'searchForm',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'Address',
'SearchResult',
[
AddressController::class => 'searchResult',
],
[
AddressController::class => 'searchResult',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'Address',
'CategoryList',
[
CategoryController::class => 'list',
],
[],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
ExtensionUtility::configurePlugin(
'Address',
'TagList',
[
TagController::class => 'list',
],
[],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1603209223] = [
'nodeName' => 'map',
'priority' => '10',
'class' => MapElement::class,
];
// Page module hook
/*$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['address_pi1']['address'] =
\WapplerSystems\Address\Hooks\PageLayoutView::class . '->getExtensionSummary';*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['address_clearcache'] =
DataHandler::class . '->clearCachePostProc';
// Edit restriction for address records
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['address'] =
DataHandler::class;
// Inline records hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tceforms_inline.php']['tceformsInlineHook']['address'] =
InlineElementHook::class;
// Xclass InlineRecordContainer
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][InlineRecordContainer::class] = [
'className' => InlineRecordContainerForAddress::class,
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][Typo3DbQueryParser::class] = [
'className' => Typo3DbQueryParserForAddress::class,
];
ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:address/Configuration/TsConfig/ContentElementWizard.tsconfig'"
);
ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:address/Configuration/TsConfig/Page/config.tsconfig'"
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim('
plugin {
tx_address_listanddetail.view.pluginNamespace = tx_address_pi1
tx_address_detail.view.pluginNamespace = tx_address_pi1
tx_address_list.view.pluginNamespace = tx_address_pi1
tx_address_categorylist.view.pluginNamespace = tx_address_pi1
tx_address_searchform.view.pluginNamespace = tx_address_pi1
tx_address_searchresult.view.pluginNamespace = tx_address_pi1
tx_address_taglist.view.pluginNamespace = tx_address_pi1
tx_address_map.view.pluginNamespace = tx_address_pi1
}
config.pageTitleProviders {
address {
provider = WapplerSystems\Address\Seo\AddressTitleProvider
before = altPageTitle,record,seo
}
}
'));
// Register cache frontend for proxy class generation
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['address'] = [
'frontend' => PhpFrontend::class,
'backend' => FileBackend::class,
'groups' => [
'all',
'system',
],
'options' => [
'defaultLifetime' => 0,
]
];
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['address_geocoding'] ?? null)) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['address_geocoding'] = [
'frontend' => VariableFrontend::class,
'backend' => Typo3DatabaseBackend::class,
];
}
if (class_exists(ClassLoader::class)) {
ClassLoader::registerAutoloader();
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][] =
ClassCacheManager::class . '->reBuild';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord'][AddressRowInitializeNew::class] = [
'depends' => [
DatabaseRowInitializeNew::class,
]
];
ClassLoader::registerAutoloader();
if (ExtensionManagementUtility::isLoaded('form')) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['beforeRendering'][1506563222] = AddressHook::class;
}
ExtensionManagementUtility::addTypoScriptSetup(
'module.tx_form {
settings {
yamlConfigurations {
90 = EXT:address/Configuration/Yaml/BaseSetup.yaml
}
}
}'
);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\WapplerSystems\Address\Validation\Double6Validator::class] = '';
};
$boot();
unset($boot);