-
Notifications
You must be signed in to change notification settings - Fork 19
/
ext_localconf.php
130 lines (110 loc) · 5.42 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
<?php
/* | This extension is made for TYPO3 CMS and is licensed
* | under GNU General Public License.
* |
* | (c) 2012-2024 Armin Vieweg <[email protected]>
*/
$extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dce');
// Clear cache hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['dce'] =
\T3\Dce\Hooks\ClearCacheHook::class . '->flushDceCache';
// AfterSave hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['dce'] =
\T3\Dce\Hooks\AfterSaveHook::class;
// ImportExport Hooks
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/impexp/class.tx_impexp.php']['before_setRelation']['dce'] =
\T3\Dce\Hooks\ImportExportHook::class . '->beforeSetRelation';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/impexp/class.tx_impexp.php']['before_writeRecordsRecords']['dce'] =
\T3\Dce\Hooks\ImportExportHook::class . '->beforeWriteRecordsRecords';
// Register ke_search hook to be able to index DCE frontend output
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('ke_search')) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyContentFromContentElement'][] =
\T3\Dce\Hooks\KeSearchHook::class;
}
// Special tce validators (eval)
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']
[\T3\Dce\UserFunction\CustomFieldValidation\LowerCamelCaseValidator::class] =
'EXT:dce/Classes/UserFunction/CustomFieldValidation/LowerCamelCaseValidator.php';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals']
[\T3\Dce\UserFunction\CustomFieldValidation\NoLeadingNumberValidator::class] =
'EXT:dce/Classes/UserFunction/CustomFieldValidation/NoLeadingNumberValidator.php';
// Update Scripts
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['dceMigrateDceFieldDatabaseRelationUpdate'] =
\T3\Dce\UpdateWizards\MigrateDceFieldDatabaseRelationUpdateWizard::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['dceMigrateFlexformSheetIdentifierUpdate'] =
\T3\Dce\UpdateWizards\MigrateFlexformSheetIdentifierUpdateWizard::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['dceFixMalformedDceFieldVariableNamesUpdate'] =
\T3\Dce\UpdateWizards\FixMalformedDceFieldVariableNamesUpdateWizard::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['dceFileToFalUpdate'] =
\T3\Dce\UpdateWizards\FileToFalUpdateWizard::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['dceInlineFalToFileUpdateWizard'] =
\T3\Dce\UpdateWizards\InlineFalToFileUpdateWizard::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['dceMigrateFlexformSysFileReferencesUpdateWizard'] =
\T3\Dce\UpdateWizards\MigrateFlexformSysFileReferencesUpdateWizard::class;
// Logger for update scripts
$GLOBALS['TYPO3_CONF_VARS']['LOG']['T3']['Dce']['UpdateWizards']['writerConfiguration'] = [
\TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
'logFile' => \TYPO3\CMS\Core\Core\Environment::getVarPath() . '/log/dce_update_wizards.log'
],
],
];
// Register Plugin to get Dce instance
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'dce',
'Dce',
[
\T3\Dce\Controller\DceController::class => 'renderDce'
],
[
\T3\Dce\Controller\DceController::class => ''
]
);
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['Dce']['modules']
= $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions']['Dce']['plugins'];
// Register DCEs
$generator = new \T3\Dce\Components\ContentElementGenerator\Generator();
$generator->makePluginConfiguration();
// Register PageTS defaults
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('tx_dce.defaults {
simpleBackendView {
titleCropLength = 10
titleCropAppendix = ...
imageWidth = 50c
imageHeight = 50c
containerGroupColors {
10 = #0079BF
11 = #D29034
12 = #519839
13 = #B04632
14 = #838C91
15 = #CD5A91
16 = #4BBF6B
17 = #89609E
18 = #00AECC
19 = #ED2448
20 = #FF8700
}
}
}');
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('linkvalidator')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod.linkvalidator.searchFields.tt_content := addToList(pi_flexform)'
);
}
// Global namespace for Fluid templates
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['dce'] = ['T3\\Dce\\ViewHelpers'];
// UserFunc TypoScript Condition (for expression language)
$providerName = 'TYPO3\CMS\Core\ExpressionLanguage\TypoScriptConditionProvider';
$sectionName = 'additionalExpressionLanguageProvider';
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$providerName][$sectionName])) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$providerName][$sectionName] = [];
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$providerName][$sectionName][] =
\T3\Dce\Components\UserConditions\TypoScriptConditionFunctionProvider::class;
// Code Mirror Node for FormEngine
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1551536118] = [
'nodeName' => 'dceCodeMirrorField',
'priority' => '70',
'class' => \T3\Dce\UserFunction\FormEngineNode\DceCodeMirrorFieldRenderType::class,
];