‪TYPO3CMS  ‪main
DatabaseSchemaService.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
16 namespace ‪TYPO3\CMS\Core\Cache;
17 
20 
25 {
30  #[AsEventListener('caching-framework')]
32  {
34  }
35 
44  {
45  // Use new to circumvent the singleton pattern of CacheManager
46  $cacheManager = new ‪CacheManager();
47  $cacheManager->setCacheConfigurations(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']);
48 
49  $tableDefinitions = '';
50  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] as $cacheName => $_) {
51  $backend = $cacheManager->getCache($cacheName)->getBackend();
52  if (method_exists($backend, 'getTableDefinitions')) {
53  $tableDefinitions .= LF . $backend->getTableDefinitions();
54  }
55  }
56 
57  return $tableDefinitions;
58  }
59 }
‪TYPO3\CMS\Core\Cache
‪TYPO3\CMS\Core\Cache\DatabaseSchemaService
Definition: DatabaseSchemaService.php:25
‪TYPO3\CMS\Core\Attribute\AsEventListener
Definition: AsEventListener.php:25
‪TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent\addSqlData
‪addSqlData($data)
Definition: AlterTableDefinitionStatementsEvent.php:28
‪TYPO3\CMS\Core\Cache\DatabaseSchemaService\getCachingFrameworkRequiredDatabaseSchema
‪string getCachingFrameworkRequiredDatabaseSchema()
Definition: DatabaseSchemaService.php:43
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36
‪TYPO3\CMS\Core\Cache\DatabaseSchemaService\addCachingFrameworkDatabaseSchema
‪addCachingFrameworkDatabaseSchema(AlterTableDefinitionStatementsEvent $event)
Definition: DatabaseSchemaService.php:31
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent
Definition: AlterTableDefinitionStatementsEvent.php:25