-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathext_localconf.php
221 lines (200 loc) · 8.21 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
215
216
217
218
219
220
221
<?php
/*
* This file is part of the composer package buepro/typo3-pizpalue.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
defined('TYPO3') || die('Access denied.');
/**
* PageTS
*/
(static function () {
// Initialization
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
);
$bootstrapPackageConfiguration = $extensionConfiguration->get('bootstrap_package');
$pizpalueConfiguration = $extensionConfiguration->get('pizpalue');
// Add BackendLayouts for the BackendLayout DataProvider
// @todo Remove once bootstrap_package switched to using page.tsconfig (ref 1724069741)
if (!(bool) $bootstrapPackageConfiguration['disablePageTsBackendLayouts']) {
// Disable some bootstrap_package backend layouts
if (!(bool) $pizpalueConfiguration['enableBootstrapPackageBackendLayouts']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Configuration/TsConfig/Page/Mod/WebLayout/DisableBackendLayouts.tsconfig'"
);
}
// Pizpalue backend layouts
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts/*.tsconfig'"
);
}
// Remove bootstrap package container elements
if (!(bool) $pizpalueConfiguration['enableBootstrapPackageContainerElements'] &&
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('container_elements')
) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Configuration/TsConfig/Page/ContentElement/RemoveBootstrapPackageContainerElements.tsconfig'"
);
}
// Default PageTS for TCEFORM
if ((bool) $pizpalueConfiguration['enableDefaultPageTSconfig']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Configuration/TsConfig/Page/TCEFORM.tsconfig'"
);
}
})();
/**
* Additional content elements
*/
(static function () {
// Initialization
$pizpalueConfiguration = (\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
))->get('pizpalue');
// Add page tsconfig
if ((bool) $pizpalueConfiguration['enableDefaultPageTSconfig']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Configuration/TsConfig/Page/ContentElement/All.tsconfig'"
);
}
})();
/**
* Bootstrap popover implementation
*/
(static function () {
/** @extensionScannerIgnoreLine */
$GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler']['pppopover'] =
\Buepro\Pizpalue\Sysext\Core\LinkHandling\PopoverLinkHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['typolinkBuilder']['pppopover'] =
\Buepro\Pizpalue\Sysext\Frontend\TypoLink\PopoverLinkBuilder::class;
})();
/**
* Configure system extensions
*/
(static function () {
/**
* EXT:core
* Register TelephoneLinkHandler and EmailLinkHandler
* @extensionScannerIgnoreLine
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler']['telephone'] =
\Buepro\Pizpalue\Sysext\Core\LinkHandling\TelephoneLinkHandler::class;
/** @extensionScannerIgnoreLine */
$GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler']['email'] =
\Buepro\Pizpalue\Sysext\Core\LinkHandling\EmailLinkHandler::class;
/**
* EXT:backend
*/
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('backend')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'@import "EXT:pizpalue/Sysext/backend/Configuration/TsConfig/page.tsconfig"'
);
}
/**
* EXT:form
*/
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('form')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim('
module.tx_form {
settings {
yamlConfigurations {
200 = EXT:pizpalue/Configuration/Form/CustomFormSetup.yaml
260 = EXT:pizpalue/Configuration/Form/MailToSystem/BaseSetup.yaml
262 = EXT:pizpalue/Configuration/Form/MailToSystem/FormEditorSetup.yaml
264 = EXT:pizpalue/Configuration/Form/MailToSystem/FormEngineSetup.yaml
}
}
}
plugin.tx_form {
settings {
yamlConfigurations {
200 = EXT:pizpalue/Configuration/Form/CustomFormSetup.yaml
260 = EXT:pizpalue/Configuration/Form/MailToSystem/BaseSetup.yaml
264 = EXT:pizpalue/Configuration/Form/MailToSystem/FormEngineSetup.yaml
}
}
}
'));
}
})();
/**
* Configure 3rd party extensions
*/
(static function () {
$pizpalueConfiguration = (\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
))->get('pizpalue');
/**
* EXT:container_elements
*/
if (
(bool)($pizpalueConfiguration['autoLoadStaticTSForExtensions'] ?? true) &&
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('container_elements') &&
(($containerElementsVersion = \Buepro\Pizpalue\Utility\VersionUtility::getExtensionVersion('container_elements'))
=== 0 || $containerElementsVersion > 3001001)
) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants(
'@import "EXT:pizpalue/Extensions/container_elements/Configuration/TypoScript/constants.typoscript"'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
'@import "EXT:pizpalue/Extensions/container_elements/Configuration/TypoScript/setup.typoscript"'
);
}
/**
* EXT:news
*/
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('news')) {
if ((bool)$pizpalueConfiguration['enableDefaultPageTSconfig']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Extensions/news/Configuration/TsConfig/Page.tsconfig'"
);
}
}
/**
* EXT:eventnews
*/
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('eventnews')) {
if ((bool)$pizpalueConfiguration['enableDefaultPageTSconfig']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:pizpalue/Extensions/eventnews/Configuration/TsConfig/Page.tsconfig'"
);
}
}
/**
* EXT:easyconf
*/
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('easyconf')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants(
"@import 'EXT:pizpalue/Extensions/easyconf/Configuration/TypoScript/constants.typoscript'"
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
"@import 'EXT:pizpalue/Extensions/easyconf/Configuration/TypoScript/setup.typoscript'"
);
}
})();
/**
* Various
*/
(static function () {
/**
* RTE: Add default configuration for pizpalue
*/
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['pizpalue'] = 'EXT:pizpalue/Configuration/RTE/Default.yaml';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('RTE.default.preset = pizpalue');
/**
* Hook: DataHandler used to set image variants for content elements
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']
['pizpalue'] = \Buepro\Pizpalue\Hook\DataHandlerHook::class;
/**
* Form engine user functions
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']
['Buepro\\Pizpalue\\UserFunction\\FormEngine\\CssEval'] = '';
/**
* Register "pp" as global fluid namespace
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['pp'][] = 'Buepro\\Pizpalue\\ViewHelpers';
})();