forked from T3Voila/templavoilaplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
133 lines (112 loc) · 8.58 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
<?php
defined('TYPO3_MODE') or die();
// Unserializing the configuration so we can use it here
$_EXTCONF = unserialize($_EXTCONF);
// Register "XCLASS" of FlexFormTools for language parsing
// Done also in TableConfigurationPostProcessingHook!
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['className']
= \Tvp\TemplaVoilaPlus\Configuration\FlexForm\FlexFormTools8::class;
// Language diff updating in flex
$GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] = true;
$renderFceHeader = '';
if ($_EXTCONF['enable.']['renderFCEHeader']) {
$renderFceHeader = '
10 < lib.stdheader';
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('fluid_styled_content')) {
$renderFceHeader = '
10 =< lib.fluidContent
10.templateName = Header';
}
}
// Adding the two plugins TypoScript:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('templavoilaplus', 'setup', '
# Setting templavoila plugin TypoScript
plugin.tx_templavoilaplus_pi1 = USER
plugin.tx_templavoilaplus_pi1.userFunc = Tvp\TemplaVoilaPlus\Controller\Frontend\FrontendController->renderContent
plugin.tx_templavoilaplus_pi1.disableExplosivePreview = 1
tt_content.templavoilaplus_pi1 = COA
tt_content.templavoilaplus_pi1 {
' . $renderFceHeader . '
20 < plugin.tx_templavoilaplus_pi1
}
tt_content.menu.20.3 = USER
tt_content.menu.20.3.userFunc = Tvp\TemplaVoilaPlus\Controller\SectionIndexController->mainAction
tt_content.menu.20.3.select.where >
tt_content.menu.20.3.indexField.data = register:tx_templavoilaplus_pi1.current_field
', 'defaultContentRendering');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templavoilaplus/Configuration/TSConfig/Page.ts">'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templavoilaplus/Configuration/TSConfig/User.ts">'
);
// Adding Page Template Selector Fields to root line:
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ',tx_templavoilaplus_map,tx_templavoilaplus_next_map';
// Register our classes at a the hooks:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['templavoilaplus']
= \Tvp\TemplaVoilaPlus\Service\DataHandling\DataHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['templavoilaplus']
= \Tvp\TemplaVoilaPlus\Service\DataHandling\DataHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass']['templavoilaplus']
= \Tvp\TemplaVoilaPlus\Service\DataHandling\DataHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['recordEditAccessInternals']['templavoilaplus']
= \Tvp\TemplaVoilaPlus\Service\UserFunc\Access::class . '->recordEditAccessInternals';
// Hook after ext_tables run to do all FormHandler registering things
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing']['templavoilaplus']
= \Tvp\TemplaVoilaPlus\Hooks\TableConfigurationPostProcessingHook::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess']['templavoilaplus']
= \Tvp\TemplaVoilaPlus\Hooks\BackendControllerHook::class . '->addInlineSettings';
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['l10nmgr']['indexFilter']['tx_templavoilaplus_usedCE']
= array(\Tvp\TemplaVoilaPlus\Service\UserFunc\UsedContentElement::class);
// Register Preview Classes for Page Module
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['default'] = \Tvp\TemplaVoilaPlus\Controller\Preview\DefaultController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['text'] = \Tvp\TemplaVoilaPlus\Controller\Preview\TextController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['table'] = \Tvp\TemplaVoilaPlus\Controller\Preview\TextController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['mailform'] = \Tvp\TemplaVoilaPlus\Controller\Preview\TextController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['header'] = \Tvp\TemplaVoilaPlus\Controller\Preview\HeaderController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['multimedia'] = \Tvp\TemplaVoilaPlus\Controller\Preview\MultimediaController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['media'] = \Tvp\TemplaVoilaPlus\Controller\Preview\MediaController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['uploads'] = \Tvp\TemplaVoilaPlus\Controller\Preview\UploadsController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['textpic'] = \Tvp\TemplaVoilaPlus\Controller\Preview\TextpicController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['splash'] = \Tvp\TemplaVoilaPlus\Controller\Preview\TextpicController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['image'] = \Tvp\TemplaVoilaPlus\Controller\Preview\ImageController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['bullets'] = \Tvp\TemplaVoilaPlus\Controller\Preview\BulletsController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['html'] = \Tvp\TemplaVoilaPlus\Controller\Preview\HtmlController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['menu'] = \Tvp\TemplaVoilaPlus\Controller\Preview\MenuController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['list'] = \Tvp\TemplaVoilaPlus\Controller\Preview\ListController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['search'] = \Tvp\TemplaVoilaPlus\Controller\Preview\NullController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['login'] = \Tvp\TemplaVoilaPlus\Controller\Preview\NullController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['shortcut'] = \Tvp\TemplaVoilaPlus\Controller\Preview\NullController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['div'] = \Tvp\TemplaVoilaPlus\Controller\Preview\NullController::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['mod1']['renderPreviewContent']['templavoilaplus_pi1'] = \Tvp\TemplaVoilaPlus\Controller\Preview\NullController::class;
// Register slot for translation mirror url
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
\TYPO3\CMS\Lang\Service\TranslationService::class,
'postProcessMirrorUrl',
\Tvp\TemplaVoilaPlus\Slots\TranslationServiceSlot::class,
'postProcessMirrorUrl'
);
// Register install/update processes
// 8LTS Update
// Add us as first Update process, so we can run before DatabaseRowsUpdateWizard
if (version_compare(TYPO3_version, '9.5.0', '>=')) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] = array_merge(
[\Tvp\TemplaVoilaPlus\Updates\Typo3Lts9Update::class => \Tvp\TemplaVoilaPlus\Updates\Typo3Lts9Update::class],
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']
);
} else {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] = array_merge(
[\Tvp\TemplaVoilaPlus\Updates\Typo3Lts8Update::class => \Tvp\TemplaVoilaPlus\Updates\Typo3Lts8Update::class],
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']
);
}
// Since TV+ 8.0.0
\Tvp\TemplaVoilaPlus\Utility\ExtensionUtility::registerExtension('templavoilaplus');
if (TYPO3_MODE === 'BE') {
// Hook to enrich tt_content form flex element with finisher settings and form list drop down
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][
\Tvp\TemplaVoilaPlus\Configuration\FlexForm\DataStructureIdentifierHook::class
] = \Tvp\TemplaVoilaPlus\Configuration\FlexForm\DataStructureIdentifierHook::class;
}