[!!!][BUGFIX] EXT:form - Resolve caching issues with predefined forms
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 if (TYPO3_MODE === 'BE') {
5 // Apply PageTSconfig
6 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
7 '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/PageTS/modWizards.ts">'
8 );
9
10 // Add default User TS Config FORM configuration
11 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
12 '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/UserTSconfig/userTSConfig.txt">'
13 );
14
15 // Backend view
16 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['mailform'] =
17 \TYPO3\CMS\Form\Hooks\PageLayoutView\MailformPreviewRenderer::class;
18
19 $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1440772316] = array(
20 'nodeName' => 'formwizard',
21 'priority' => 40,
22 'class' => \TYPO3\CMS\Form\View\Wizard\Element\FormWizardElement::class,
23 );
24 }
25
26 // Extbase handling
27 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter(
28 \TYPO3\CMS\Form\Domain\Property\TypeConverter\ArrayToValidationElementConverter::class
29 );
30
31 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
32 'TYPO3.CMS.Form',
33 'Form',
34 array('Frontend' => 'show, confirmation, dispatchConfirmationButtonClick, process, afterProcess'),
35 array('Frontend' => 'show, confirmation, dispatchConfirmationButtonClick, process, afterProcess')
36 );
37
38 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
39 $signalSlotDispatcher->connect(
40 \TYPO3\CMS\Form\Domain\Builder\FormBuilder::class,
41 'txFormHandleIncomingValues',
42 \TYPO3\CMS\Form\Hooks\HandleIncomingFormValues::class,
43 'handleIncomingFormValues'
44 );
45
46 // Register the extbase plugin as shorthand for typoscript 10 = FORM
47 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['FORM'] = \TYPO3\CMS\Form\ContentObject\FormContentObject::class;