Skip to content

Commit

Permalink
[!!!][TASK] Migrate list_type to CType
Browse files Browse the repository at this point in the history
  • Loading branch information
derhansen committed Mar 5, 2025
1 parent 42ea8ac commit a45f203
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 6 deletions.
53 changes: 53 additions & 0 deletions Classes/Updates/PluginToContentElementUpdater.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

declare(strict_types=1);

/****************************************************************
* Copyright notice
*
* (C) Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

namespace Mittwald\Web2pdf\Updates;

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

#[UpgradeWizard('web2pdfPluginToContentElementUpdate')]
class PluginToContentElementUpdater extends AbstractListTypeToCTypeUpdate
{
protected function getListTypeToCTypeMapping(): array
{
return [
'web2pdf_pi1' => 'web2pdf_pi1',
];
}

public function getTitle(): string
{
return 'ext:web2pdf: Migrate plugins to content elements';
}

public function getDescription(): string
{
return 'Migrates existing plugin records and backend user permissions used by ext:web2pdf.';
}
}
6 changes: 1 addition & 5 deletions Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@ plugin.tx_web2pdf {
}
}

lib.web2pdf = USER
lib.web2pdf = EXTBASEPLUGIN
lib.web2pdf {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
pluginName = Pi1
extensionName = Web2pdf
vendorName = Mittwald
controller = Pdf
action = generatePdfLink
}

# Example include of generate pdf link
Expand Down
3 changes: 2 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
'web2pdf',
'Pi1',
[PdfController::class => 'generatePdfLink'],
[PdfController::class => 'generatePdfLink']
[PdfController::class => 'generatePdfLink'],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);

0 comments on commit a45f203

Please sign in to comment.