Skip to content

Commit

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

declare(strict_types=1);

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/

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"';
}
}
43 changes: 43 additions & 0 deletions Classes/Upgrades/HaikuPluginListTypeToCTypeUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

declare(strict_types=1);

/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/

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 abed535

Please sign in to comment.