Skip to content
Snippets Groups Projects
Commit f0566e68 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Creating class for migrating data after update

parent 9e1b62ec
No related branches found
No related tags found
1 merge request!2Feature multiclient
......@@ -26,9 +26,31 @@ namespace SGalinski\SgMail\Updates;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Install\Updates\AbstractUpdate;
/**
* Migrate template db entries to the correct root pages
*/
class MigrateSgMailTemplates {
class MigrateData extends AbstractUpdate {
/**
* Checks whether updates are required.
*
* @param string &$description The description for the update
* @return bool Whether an update is required (TRUE) or not (FALSE)
*/
public function checkForUpdate(&$description) {
// TODO: Implement checkForUpdate() method.
}
/**
* Performs the accordant updates.
*
* @param array &$dbQueries Queries done in this update
* @param mixed &$customMessages Custom messages
* @return bool Whether everything went smoothly or not
*/
public function performUpdate(array &$dbQueries, &$customMessages) {
// TODO: Implement performUpdate() method.
}
}
......@@ -35,6 +35,10 @@ $extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('sg_mail'
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] =
\SGalinski\SgMail\Command\SendMailCommandController::class;
// add upgrade wizard for moving all db entries to the ele siteroot
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgmail_migrate_data'] = \SGalinski\SgMail\Updates\MigrateData::class;
if (TYPO3_MODE === 'BE') {
$tsPath = $extPath . 'Configuration/TypoScript/';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(file_get_contents($tsPath . 'setup.ts'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment