2021-02-03 17:20:01 +01:00
|
|
|
<?php
|
|
|
|
|
2023-11-30 13:52:23 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
|
|
|
use TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask;
|
|
|
|
use WerkraumMedia\ThueCat\Extension;
|
2021-02-03 17:20:01 +01:00
|
|
|
|
2023-11-30 13:52:23 +01:00
|
|
|
defined('TYPO3') or die();
|
2021-06-01 09:44:14 +02:00
|
|
|
|
2023-11-30 13:52:23 +01:00
|
|
|
Extension::registerConfig();
|
2023-01-30 15:51:17 +01:00
|
|
|
|
2021-06-01 09:44:14 +02:00
|
|
|
(static function (string $extensionKey) {
|
2023-11-30 13:52:23 +01:00
|
|
|
ExtensionManagementUtility::addTypoScriptSetup(
|
2021-06-01 09:44:14 +02:00
|
|
|
'@import "EXT:' . $extensionKey . '/Configuration/TypoScript/Default/Setup.typoscript"'
|
|
|
|
);
|
2023-01-03 10:42:33 +01:00
|
|
|
|
|
|
|
$tablesForCleanup = [
|
|
|
|
'tx_thuecat_import_log',
|
|
|
|
'tx_thuecat_import_log_entry',
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($tablesForCleanup as $tableName) {
|
2023-11-30 13:52:23 +01:00
|
|
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][TableGarbageCollectionTask::class]['options']['tables'][$tableName] = [
|
2023-01-03 10:42:33 +01:00
|
|
|
'dateField' => 'crdate',
|
|
|
|
'expirePeriod' => '180',
|
|
|
|
];
|
|
|
|
}
|
2023-11-30 13:52:23 +01:00
|
|
|
})(Extension::EXTENSION_KEY);
|