TYPO3  7.6
rtehtmlarea/Configuration/TCA/Overrides/tt_content.php
Go to the documentation of this file.
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 }