Skip to content
Snippets Groups Projects
Commit d25257a1 authored by Helmut Hummel's avatar Helmut Hummel Committed by Markus Klein
Browse files

[TASK] Make driver registry TCA change cacheable

Instead of calling the driver registry on every request,
we can cache the TCA addition, by putting the call into overrides.

Resolves: #76102
Releases: 7.6, master
Change-Id: I8cfc72f0e7dbb133eecc754fd3cb774637a0d4bf
Reviewed-on: https://review.typo3.org/48047


Reviewed-by: default avatarNicole Cordes <typo3@cordes.co>
Tested-by: default avatarNicole Cordes <typo3@cordes.co>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent 4e5b0e00
Branches
Tags
No related merge requests found
......@@ -87,10 +87,6 @@ class DriverRegistry implements \TYPO3\CMS\Core\SingletonInterface
*/
public function addDriversToTCA()
{
// Add driver to TCA of sys_file_storage
if (TYPO3_MODE !== 'BE') {
return;
}
$driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
$configurationFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
foreach ($this->driverConfigurations as $driver) {
......
<?php
defined('TYPO3_MODE') || die();
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Driver\DriverRegistry::class)->addDriversToTCA();
......@@ -40,10 +40,6 @@ $GLOBALS['PAGES_TYPES'] = array(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('sys_category,sys_file_reference,sys_file_collection');
/** @var \TYPO3\CMS\Core\Resource\Driver\DriverRegistry $registry */
$registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Driver\DriverRegistry::class);
$registry->addDriversToTCA();
/**
* $TBE_MODULES contains the structure of the backend modules as they are
* arranged in main- and sub-modules. Every entry in this array represents a
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment