mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-11-04 20:36:13 +01:00
29 lines
858 B
PHP
29 lines
858 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
|
use TYPO3\CMS\Scheduler\Task\TableGarbageCollectionTask;
|
|
use WerkraumMedia\ThueCat\Extension;
|
|
|
|
defined('TYPO3') or die();
|
|
|
|
Extension::registerConfig();
|
|
|
|
(static function (string $extensionKey) {
|
|
ExtensionManagementUtility::addTypoScriptSetup(
|
|
'@import "EXT:' . $extensionKey . '/Configuration/TypoScript/Default/Setup.typoscript"'
|
|
);
|
|
|
|
$tablesForCleanup = [
|
|
'tx_thuecat_import_log',
|
|
'tx_thuecat_import_log_entry',
|
|
];
|
|
|
|
foreach ($tablesForCleanup as $tableName) {
|
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][TableGarbageCollectionTask::class]['options']['tables'][$tableName] = [
|
|
'dateField' => 'crdate',
|
|
'expirePeriod' => '180',
|
|
];
|
|
}
|
|
})(Extension::EXTENSION_KEY);
|