[!!!][FEATURE] FormEngine element level refactoring
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / Configuration / TCA / Overrides / tt_content.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Adding soft reference keys in tt_content configuration
5 // htmlArea RTE soft reference keys are inserted in front so that their tokens are inserted first
6 $GLOBALS['TCA']['tt_content']['columns']['header']['config']['softref'] = 'typolink_tag' . ($GLOBALS['TCA']['tt_content']['columns']['header']['config']['softref'] ? ',' . $GLOBALS['TCA']['tt_content']['columns']['header']['config']['softref'] : '');
7
8 foreach ($GLOBALS['TCA']['tt_content']['columns'] as $column => $config) {
9 if ($config['config']['softref']) {
10 if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($config['config']['softref'], 'images')) {
11 // Remove obsolete soft reference key 'images'
12 // The references from RTE content to the original images are handled with the key 'rtehtmlarea_images'.
13 $softReferences = 'rtehtmlarea_images,' . \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList('images', $config['config']['softref']);
14 $GLOBALS['TCA']['tt_content']['columns'][$column]['config']['softref'] = $softReferences;
15 }
16 } else {
17 if ($config['config']['type'] === 'text') {
18 $GLOBALS['TCA']['tt_content']['columns'][$column]['config']['softref'] = 'rtehtmlarea_images,typolink_tag';
19 }
20 }
21 }
22
23 // Enabling the full screen wizard here by checking isLoaded is a bit hacky, but currently the least
24 // disturbing solution that does not trigger load-order issues
25 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('css_styled_content')) {
26 $GLOBALS['TCA']['tt_content']['types']['text']['columnsOverrides']['bodytext']['config']['fieldControl']['fullScreenRichtext']['disabled'] = false;
27 $GLOBALS['TCA']['tt_content']['types']['textpic']['columnsOverrides']['bodytext']['config']['fieldControl']['fullScreenRichtext']['disabled'] = false;
28 }
29 if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('fluid_styled_content')) {
30 $GLOBALS['TCA']['tt_content']['types']['textmedia']['columnsOverrides']['bodytext']['config']['fieldControl']['fullScreenRichtext']['disabled'] = false;
31 }