Commit ae2b3f6d authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Use identifier constants for the upgrade wizards

parent 7beaccc8
......@@ -35,6 +35,10 @@ use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
* Makes german templates the default and former default as english templates
*/
class UpdateGermanAsDefault implements UpgradeWizardInterface {
/**
* The wizard identifier
*/
const IDENTIFIER = 'tx_sgmail_update_german_as_default';
/**
* @var string
......@@ -45,7 +49,7 @@ class UpdateGermanAsDefault implements UpgradeWizardInterface {
* @return string
*/
public function getIdentifier(): string {
return 'tx_sgmail_update_german_as_default';
return self::IDENTIFIER;
}
/**
......
......@@ -37,6 +37,10 @@ use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
* Fix all incorrect / deprecated language codes (be languages instead of sys languages) in the database
*/
class UpdateLanguages implements UpgradeWizardInterface {
/**
* The wizard identifier
*/
const IDENTIFIER = 'tx_sgmail_update_languages';
/**
* @var array
......@@ -62,7 +66,7 @@ class UpdateLanguages implements UpgradeWizardInterface {
* @return string
*/
public function getIdentifier(): string {
return 'tx_sgmail_update_languages';
return self::IDENTIFIER;
}
/**
......
......@@ -37,6 +37,10 @@ use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
* Migrate template db entries to the correct root pages
*/
class UpdatePidToSiteRoot implements UpgradeWizardInterface {
/**
* The wizard identifier
*/
const IDENTIFIER = 'tx_sgmail_update_pid_to_site_root';
/**
* @var array
......@@ -61,7 +65,7 @@ class UpdatePidToSiteRoot implements UpgradeWizardInterface {
* @return string
*/
public function getIdentifier(): string {
return 'tx_sgmail_update_pid_to_site_root';
return self::IDENTIFIER;
}
/**
......
......@@ -35,6 +35,11 @@ use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
* Update the correct sending times (if any)
*/
class UpdateSendingTimes implements UpgradeWizardInterface {
/**
* The wizard identifier
*/
const IDENTIFIER = 'tx_sgmail_update_sending_times';
/**
* @var string
*/
......
......@@ -31,10 +31,10 @@ call_user_func(
\SGalinski\SgMail\Command\SendMailCommandController::class;
// add upgrade wizard for moving all db entries to their respected siteroot
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgmail_update_pid_to_site_root'] = \SGalinski\SgMail\Updates\UpdatePidToSiteRoot::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgmail_update_sending_times'] = \SGalinski\SgMail\Updates\UpdateSendingTimes::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgmail_update_languages'] = \SGalinski\SgMail\Updates\UpdateLanguages::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgmail_update_german_as_default'] = \SGalinski\SgMail\Updates\UpdateGermanAsDefault::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgMail\Updates\UpdatePidToSiteRoot::IDENTIFIER] = \SGalinski\SgMail\Updates\UpdatePidToSiteRoot::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgMail\Updates\UpdateSendingTimes::IDENTIFIER] = \SGalinski\SgMail\Updates\UpdateSendingTimes::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgMail\Updates\UpdateLanguages::IDENTIFIER] = \SGalinski\SgMail\Updates\UpdateLanguages::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgMail\Updates\UpdateGermanAsDefault::IDENTIFIER] = \SGalinski\SgMail\Updates\UpdateGermanAsDefault::class;
if (TYPO3_MODE === 'BE') {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
......
Supports Markdown
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