slugService = $slugService; } public function executeUpdate(): bool { // user decided to migrate, migrate and mark wizard as done $queries = $this->slugService->performRealurlAliasMigration(); return true; } public function updateNecessary(): bool { $updateNeeded = false; $elementCount = $this->slugService->countOfRealurlAliasMigrations(); if ($elementCount > 0) { $updateNeeded = true; } return $updateNeeded; } /** * @return string[] All new fields and tables must exist */ public function getPrerequisites(): array { return [ DatabaseUpdatedPrerequisite::class ]; } /** * Get title * * @return string */ public function getTitle(): string { return '[Optional] Migrate realurl alias to slug field "path_segment" of EXT:news records'; } /** * Get description * * @return string Longer description of this updater */ public function getDescription(): string { return 'Migrates EXT:realurl unique alias values into empty slug field "path_segment" of EXT:news records.'; } /** * @return string Unique identifier of this updater */ public function getIdentifier(): string { return 'realurlAliasNewsSlug'; } /** * Second step: Ask user to install the extensions * * @param string $inputPrefix input prefix, all names of form fields have to start with this. Append custom name in [ ... ] * @return string HTML output */ public function getUserInput($inputPrefix): string { return '
Are you really sure?

You can migrate EXT:realurl unique alias into news slugs, to ensure that the same alias is used if similar news titles are used.

This wizard migrates only matching realurl alias for news entries, where path_segment is empty. Requires database table "tx_realurl_uniqalias" from EXT:realurl, but EXT:realurl requires not to be installed.

Cause only empty news slugs will be generated within this migration, you may decide to empty all news slugs before.

The result of this migration can still left empty slugs fields for news entries. Therfore you should generate these slugs afterwards using the news slug upater wizard.

'; } }