From 5d2793e1895dd03f7eb2294797223d4fcff4321c Mon Sep 17 00:00:00 2001
From: Oliver Bartsch <bo@cedev.de>
Date: Fri, 11 Jun 2021 17:10:01 +0200
Subject: [PATCH] [TASK] Remove unused internal methods from
 ExtensionManagementUtility

The internal methods `generateItemList()` and `explodeItemList()`
from `ExtensionManagementUtility` are unused since v7 and therefore
now removed.

Resolves: #94314
Releases: master
Change-Id: I6db5cf6e198f7d69ecb58c5ca8dec1e24c9c55a4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69463
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 .../Utility/ExtensionManagementUtility.php    | 68 -------------------
 1 file changed, 68 deletions(-)

diff --git a/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php b/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
index 91145162d0c..7105b9660be 100644
--- a/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
+++ b/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
@@ -734,74 +734,6 @@ class ExtensionManagementUtility
         return implode(', ', $cleanInsertionListParts);
     }
 
-    /**
-     * Generates an array of fields/items with additional information such as e.g. the name of the palette.
-     *
-     * @param string $itemList List of fields/items to be splitted up
-     * @return array An array with the names of the fields/items as keys and additional information
-     */
-    protected static function explodeItemList($itemList)
-    {
-        $items = [];
-        $itemParts = GeneralUtility::trimExplode(',', $itemList, true);
-        foreach ($itemParts as $itemPart) {
-            $itemDetails = GeneralUtility::trimExplode(';', $itemPart, false, 5);
-            $key = $itemDetails[0];
-            if (strpos($key, '--') !== false) {
-                // If $key is a separator (--div--) or palette (--palette--) then it will be appended by a unique number. This must be removed again when using this value!
-                $key .= count($items);
-            }
-            if (!isset($items[$key])) {
-                $items[$key] = [
-                    'rawData' => $itemPart,
-                    'details' => []
-                ];
-                $details = [0 => 'field', 1 => 'label', 2 => 'palette'];
-                foreach ($details as $id => $property) {
-                    $items[$key]['details'][$property] = $itemDetails[$id] ?? '';
-                }
-            }
-        }
-        return $items;
-    }
-
-    /**
-     * Generates a list of fields/items out of an array provided by the function getFieldsOfFieldList().
-     *
-     * @see explodeItemList
-     * @param array $items The array of fields/items with optional additional information
-     * @param bool $useRawData Use raw data instead of building by using the details (default: FALSE)
-     * @return string The list of fields/items which gets used for $GLOBALS['TCA'][<table>]['types'][<type>]['showitem']
-     */
-    protected static function generateItemList(array $items, $useRawData = false)
-    {
-        $itemParts = [];
-        foreach ($items as $item => $itemDetails) {
-            if (strpos($item, '--') !== false) {
-                // If $item is a separator (--div--) or palette (--palette--) then it may have been appended by a unique number. This must be stripped away here.
-                $item = str_replace([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], '', $item);
-            }
-            if ($useRawData) {
-                $itemParts[] = $itemDetails['rawData'];
-            } else {
-                if (count($itemDetails['details']) > 1) {
-                    $details = ['palette', 'label', 'field'];
-                    $elements = [];
-                    $addEmpty = false;
-                    foreach ($details as $property) {
-                        if ($itemDetails['details'][$property] !== '' || $addEmpty) {
-                            $addEmpty = true;
-                            array_unshift($elements, $itemDetails['details'][$property]);
-                        }
-                    }
-                    $item = implode(';', $elements);
-                }
-                $itemParts[] = $item;
-            }
-        }
-        return implode(', ', $itemParts);
-    }
-
     /**
      * Add tablename to default list of allowed tables on pages (in $PAGES_TYPES)
      * Will add the $table to the list of tables allowed by default on pages as setup by $PAGES_TYPES['default']['allowedTables']
-- 
GitLab