From 6ebe14b8562bbbe5ff6fcea6294b89d724cf5352 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Sat, 12 Oct 2024 17:16:47 +0200 Subject: [PATCH] [TASK] Deprecate plugin content element and plugin subtypes (list_type) References https://github.com/TYPO3-Documentation/Changelog-To-Doc/issues/1071 Releases: main --- Configuration/TCA/Overrides/tt_content.php | 106 ------------------ .../tt_content_plugin_falexamples.php | 24 ++++ .../tt_content_plugin_haiku_detail.php | 39 +++---- .../tt_content_plugin_haiku_list.php | 26 +++-- .../tt_content_plugin_htmlparser.php | 17 +-- .../TCA/Overrides/tt_content_plugin_pi1.php | 30 +++-- .../TCA/Overrides/tt_content_plugin_pi2.php | 48 ++++++++ .../TCA/Overrides/tt_content_plugin_pi3.php | 48 ++++++++ .../TCA/Overrides/tt_content_plugin_pi4.php | 48 ++++++++ .../Overrides/tt_content_plugin_pierror.php | 27 +++++ .../TsConfig/Page/PluginHaiku.tsconfig | 25 ----- .../TypoScript/PluginHaiku/setup.typoscript | 4 +- Resources/Private/Language/locallang_db.xlf | 10 +- ext_localconf.php | 4 + 14 files changed, 270 insertions(+), 186 deletions(-) create mode 100644 Configuration/TCA/Overrides/tt_content_plugin_falexamples.php create mode 100644 Configuration/TCA/Overrides/tt_content_plugin_pi2.php create mode 100644 Configuration/TCA/Overrides/tt_content_plugin_pi3.php create mode 100644 Configuration/TCA/Overrides/tt_content_plugin_pi4.php create mode 100644 Configuration/TCA/Overrides/tt_content_plugin_pierror.php delete mode 100644 Configuration/TsConfig/Page/PluginHaiku.tsconfig diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php index a6a6af3..2904d74 100644 --- a/Configuration/TCA/Overrides/tt_content.php +++ b/Configuration/TCA/Overrides/tt_content.php @@ -1,20 +1,5 @@ $TCA array reference > ['columns'][fieldname]['config'] / TYPE: "flex" - -// Add the plugins to the list of plugins -ExtensionManagementUtility::addPlugin( - [ - 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:tt_content.list_type_pi2', - 'examples_pi2', - ], - 'list_type', - 'examples', -); -ExtensionManagementUtility::addPlugin( - [ - 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:tt_content.list_type_pi3', - 'examples_pi3', - ], - 'list_type', - 'examples', -); -ExtensionManagementUtility::addPlugin( - [ - 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:tt_content.list_type_pi4', - 'examples_pi4', - ], - 'list_type', - 'examples', -); - -// Register the "error" plugin -ExtensionUtility::registerPlugin( - 'Examples', - 'Error', - 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:tt_content.list_type_pierror', - null, - 'plugins', - 'LLL:EXT:examples/Resources/Private/Language/locallang.xlf:pierror_wizard_description', -); -// Register the FAL example plugin -ExtensionUtility::registerPlugin( - 'Examples', - 'FalExamples', - 'LLL:EXT:examples/Resources/Private/Language/locallang.xlf:falexample_plugin_title', -); - -// Disable the display of layout and select_key fields for the plugins -// provided by the extension -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_pi1'] = 'layout,select_key,pages'; -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_pi2'] = 'layout,select_key,pages'; -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_pi3'] = 'layout,select_key,pages'; -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_pi4'] = 'layout,select_key,pages'; -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_error'] = 'layout,select_key,pages'; - -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi2'] = 'pi_flexform'; -ExtensionManagementUtility::addPiFlexFormValue( - 'examples_pi2', - 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds2.xml', -); -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi3'] = 'pi_flexform'; -ExtensionManagementUtility::addPiFlexFormValue( - 'examples_pi3', - 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds3.xml', -); -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi4'] = 'pi_flexform'; -ExtensionManagementUtility::addPiFlexFormValue( - 'examples_pi4', - 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds4.xml', -); - $standardTabs = '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance, --palette--;;frames, --palette--;;appearanceLinks, @@ -259,28 +175,6 @@ ], ]; -ExtensionManagementUtility::addTcaSelectItem( - 'tt_content', - 'CType', - [ - 'label' => 'LLL:EXT:examples/Resources/Private/Language/locallang.xlf:examples_dataprocdb_title', - 'value' => 'examples_dataprocdb', - 'icon' => 'mimetypes-x-content-table', - 'group' => 'dataProcessingExamples', - 'description' => 'LLL:EXT:examples/Resources/Private/Language/locallang.xlf:examples_dataprocdb_description', - ], -); - -$GLOBALS['TCA']['tt_content']['types']['examples_dataprocdb'] = [ - 'showitem' => ' - --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, - --palette--;;general, - --palette--;;headers, - pages, - recursive, - ' . $standardTabs, -]; - ExtensionManagementUtility::addTcaSelectItem( 'tt_content', 'CType', diff --git a/Configuration/TCA/Overrides/tt_content_plugin_falexamples.php b/Configuration/TCA/Overrides/tt_content_plugin_falexamples.php new file mode 100644 index 0000000..9ea7837 --- /dev/null +++ b/Configuration/TCA/Overrides/tt_content_plugin_falexamples.php @@ -0,0 +1,24 @@ +main } -tt_content.list.20.examples_haiku_list =< plugin.tx_examples_haiku_list +tt_content.examples_haiku_list < plugin.tx_examples_haiku_list plugin.tx_examples_haiku_detail < temp.tx_examples_haiku plugin.tx_examples_haiku_detail { userFunc = T3docs\Examples\Controller\Haiku\DetailController->main } -tt_content.list.20.examples_haiku_detail =< plugin.tx_examples_haiku_detail +tt_content.examples_haiku_detail < plugin.tx_examples_haiku_detail diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index 1467e98..ff50912 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -45,19 +45,19 @@ Related pages - + Examples: simple FlexForm - + Examples: advanced FlexForm - + Examples: advanced FlexForm with localization type 1 - + Examples: advanced FlexForm with localization type 2 - + Examples: error handling diff --git a/ext_localconf.php b/ext_localconf.php index 2663556..0045191 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -127,6 +127,7 @@ [ ErrorController::class => 'index', ], + ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT, ); // Configure the HTML parser plugin @@ -136,6 +137,8 @@ [ HtmlParserController::class => 'index', ], + [], + ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT, ); // Register the FAL examples plugin @@ -149,6 +152,7 @@ [ FalExampleController::class => 'index,listFiles,collection', ], + ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT, ); // Add custom translations overriding default labels