TYPO3  7.6
rtehtmlarea/Configuration/TCA/Overrides/pages.php
Go to the documentation of this file.
1 <?php
2 defined('TYPO3_MODE') or die();
3 
4 // Adding soft reference keys in pages configuration
5 // htmlArea RTE soft reference keys are inserted in front so that their tokens are inserted first
6 foreach ($GLOBALS['TCA']['pages']['columns'] as $column => $config) {
7  if ($config['config']['softref']) {
8  if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($config['config']['softref'], 'images')) {
9  // Remove obsolete soft reference key 'images'
10  // The references from RTE content to the original images are handled with the key 'rtehtmlarea_images'.
11  $softReferences = 'rtehtmlarea_images,' . \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList('images', $config['config']['softref']);
12  $GLOBALS['TCA']['pages']['columns'][$column]['config']['softref'] = $softReferences;
13  }
14  } else {
15  if ($config['config']['type'] === 'text') {
16  $GLOBALS['TCA']['pages']['columns'][$column]['config']['softref'] = 'rtehtmlarea_images,typolink_tag';
17  }
18  }
19 }