f5d6cac81b43533a8506e4cf55b5547b767c24e9
[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 } else {
25 // Handling of cObjects "FORM" and "FORM_INT"
26 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'][] = array(
27 'FORM',
28 \TYPO3\CMS\Form\Hooks\ContentObjectHook::class
29 );
30 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'][] = array(
31 'FORM_INT',
32 \TYPO3\CMS\Form\Hooks\ContentObjectHook::class
33 );
34
35 // Extbase handling
36 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter(
37 \TYPO3\CMS\Form\Domain\Property\TypeConverter\ArrayToValidationElementConverter::class
38 );
39
40 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
41 'TYPO3.CMS.Form',
42 'Form',
43 array('Frontend' => 'show, confirmation, dispatchConfirmationButtonClick, process, afterProcess'),
44 array('Frontend' => 'show, confirmation, dispatchConfirmationButtonClick, process, afterProcess')
45 );
46
47 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
48 $signalSlotDispatcher->connect(
49 \TYPO3\CMS\Form\Domain\Builder\FormBuilder::class,
50 'txFormHandleIncomingValues',
51 \TYPO3\CMS\Form\Hooks\HandleIncomingFormValues::class,
52 'handleIncomingFormValues'
53 );
54 }