Skip to content

Commit

Permalink
[TASK] Add list_type to CType Upgrade Wizards
Browse files Browse the repository at this point in the history
Releases: main
  • Loading branch information
linawolf committed Oct 13, 2024
1 parent 36331f9 commit 25c20ff
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Classes/Upgrades/ExtbasePluginListTypeToCTypeUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace T3docs\Examples\Upgrades;

use TYPO3\CMS\Install\Attribute\UpgradeWizard;
use TYPO3\CMS\Install\Updates\AbstractListTypeToCTypeUpdate;

#[UpgradeWizard('example_extbasePluginListTypeToCTypeUpdate')]
final class ExtbasePluginListTypeToCTypeUpdate extends AbstractListTypeToCTypeUpdate
{
protected function getListTypeToCTypeMapping(): array
{
return [
'examples_error' => 'examples_error',
'examples_htmlparser' => 'examples_htmlparser',
'examples_falexamples' => 'examples_falexamples',
];
}

public function getTitle(): string
{
return 'Migrate Example Extbase plugins';
}

public function getDescription(): string
{
return 'Migrate Example Extbase plugins from deprecated registration via "list-type" to "CType"';
}
}
30 changes: 30 additions & 0 deletions Classes/Upgrades/HaikuPluginListTypeToCTypeUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

namespace T3docs\Examples\Upgrades;

use TYPO3\CMS\Install\Attribute\UpgradeWizard;
use TYPO3\CMS\Install\Updates\AbstractListTypeToCTypeUpdate;

#[UpgradeWizard('example_haikuPluginListTypeToCTypeUpdate')]
final class HaikuPluginListTypeToCTypeUpdate extends AbstractListTypeToCTypeUpdate
{
protected function getListTypeToCTypeMapping(): array
{
return [
'examples_haiku_list' => 'examples_haiku_list',
'examples_haiku_detail' => 'examples_haiku_detail',
];
}

public function getTitle(): string
{
return 'Migrate Example Haiku plugins';
}

public function getDescription(): string
{
return 'Migrate Example Haiku plugins from deprecated registration via "list-type" to "CType"';
}
}

0 comments on commit 25c20ff

Please sign in to comment.