[FEATURE] Add system extension "redirects"
[Packages/TYPO3.CMS.git] / typo3 / sysext / redirects / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Register hook into the frontend to check for a possible redirect
5 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']['redirects'] = \TYPO3\CMS\Redirects\Http\RedirectHandler::class . '->handle';
6
7 // Rebuild cache in DataHandler on changing / inserting / adding redirect records
8 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['redirects'] = \TYPO3\CMS\Redirects\Hooks\DataHandlerCacheFlushingHook::class . '->rebuildRedirectCacheIfNecessary';
9
10 // Inject sys_domains into valuepicker form
11 $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord']
12 [\TYPO3\CMS\Redirects\FormDataProvider\ValuePickerItemDataProvider::class] = [
13 'depends' => [
14 \TYPO3\CMS\Backend\Form\FormDataProvider\TcaInputPlaceholders::class,
15 ],
16 ];
17
18 // Add validation call for form field source_host and source_path
19 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\TYPO3\CMS\Redirects\Evaluation\SourcePath::class] = '';
20 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\TYPO3\CMS\Redirects\Evaluation\SourceHost::class] = '';