FinisherTranslationLanguageUpgradeWizard
final readonly class \
- Implements
- UpgradeWizardInterface, RepeatableInterface
Restore the technical value of finisher option "translation.language".
FlexForm finisher overrides and the form editor used to translate select item values, so the item value "default" was stored as its backend label, e.g. "Default" or "Standard". Every non-empty value which is not a valid language key is replaced by "default". Such values already render emails in the default language, so emails do not change. The wizard is repeatable, so forms migrated to the database later on can be migrated as well.
Internal
Tags
Attributes
- #[UpgradeWizard]
- 'formFinisherTranslationLanguageMigration'
Table of Contents
Interfaces
- UpgradeWizardInterface
- Interface UpgradeWizardInterface
- RepeatableInterface
- Use if wizard may be run multiple times (and should not be disabled after one run)
Methods
- __construct() : mixed
- executeUpdate() : bool
- Execute the update
- getDescription() : string
- Return the description for this wizard
- getPrerequisites() : string[]
- Returns an array of class names of Prerequisite classes
- getTitle() : string
- Return the speaking name of this wizard
- updateNecessary() : bool
- Is an update necessary?
Methods
__construct()
public
__construct(ConnectionPool $connectionPool, Locales $locales, JsonObjectKeyOrderPreserver $jsonObjectKeyOrderPreserver) : mixed
Parameters
- $connectionPool : ConnectionPool
- $locales : Locales
- $jsonObjectKeyOrderPreserver : JsonObjectKeyOrderPreserver
executeUpdate()
Execute the update
public
executeUpdate() : bool
Called when a wizard reports that an update is necessary
Return values
boolgetDescription()
Return the description for this wizard
public
getDescription() : string
Return values
stringgetPrerequisites()
Returns an array of class names of Prerequisite classes
public
getPrerequisites() : string[]
This way a wizard can define dependencies like "database up-to-date" or "reference index updated"
Return values
string[]getTitle()
Return the speaking name of this wizard
public
getTitle() : string
Return values
stringupdateNecessary()
Is an update necessary?
public
updateNecessary() : bool
Is used to determine whether a wizard needs to be run. Check if data for migration exists.