[FEATURE] EXT:form - Add multiselect inspector editor
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 call_user_func(function () {
5 // Register FE plugin
6 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
7 'TYPO3.CMS.Form',
8 'Formframework',
9 ['FormFrontend' => 'render, perform'],
10 ['FormFrontend' => 'perform'],
11 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
12 );
13
14 // Add new content element wizard entry
15 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
16 '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:form/Configuration/PageTS/modWizards.ts">'
17 );
18
19 // FE file upload processing
20 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerTypeConverter(
21 \TYPO3\CMS\Form\Mvc\Property\TypeConverter\UploadedFileReferenceConverter::class
22 );
23
24 // Hook to enrich tt_content form flex element with finisher settings and form list drop down
25 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][
26 \TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::class
27 ] = \TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook::class;
28
29 // Hook to count used forms elements in tt_content
30 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser']['formPersistenceIdentifier'] =
31 \TYPO3\CMS\Form\Hooks\SoftReferenceParserHook::class;
32
33 // Register for hook to show preview of tt_content element of CType="form_formframework" in page module
34 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['form_formframework'] =
35 \TYPO3\CMS\Form\Hooks\FormPagePreviewRenderer::class;
36
37 // Add a bunch of icons to icon registry
38 $iconIdentifiers = [
39 'advanced-password',
40 'checkbox',
41 'content-element',
42 'date-picker',
43 'duplicate',
44 'fieldset',
45 'file-upload',
46 'finisher',
47 'form-element-selector',
48 'image-upload',
49 'insert-after',
50 'insert-in',
51 'multi-checkbox',
52 'multi-select',
53 'page',
54 'password',
55 'radio-button',
56 'single-select',
57 'static-text',
58 'summary-page',
59 'text',
60 'textarea',
61 'validator'
62 ];
63 $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
64 foreach ($iconIdentifiers as $iconIdentifier) {
65 $iconRegistry->registerIcon(
66 't3-form-icon-' . $iconIdentifier,
67 \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
68 ['source' => 'EXT:form/Resources/Public/Images/' . $iconIdentifier . '.svg']
69 );
70 }
71 });