Skip to content

configurePlugin: class alias can be used for v10 and v11 #72

@sypets

Description

@sypets

It is not necessary to check for the TYPO3 version when using class alias in configurePlugin: the class alias can be used for TYPO3 v10 and v11 and the extension is not available for below v10


if ($typo3Version->getMajorVersion() >= 11) {
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
        'rss_display',
        'Pi1',
        [\Fab\RssDisplay\Controller\FeedController::class => 'show'],
        $pluginType === 'USER_INT' ? [\Fab\RssDisplay\Controller\FeedController::class => 'show'] : [],
        \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_PLUGIN
    );

} else  {
    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
        'Fab.rss_display',
        'Pi1',
        ['Feed' => 'show'],
        $pluginType === 'USER_INT' ? ['Feed' => 'show'] : []
    );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions