Revert "[TASK] Avoid slow array functions in loops"
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / FormDataProvider / TcaTypesShowitem.php
index 106f584..4ff4294 100644 (file)
@@ -21,7 +21,7 @@ use TYPO3\CMS\Core\Utility\MathUtility;
 /**
  * Create final showitem configuration in processedTca for types and palette
  * fields
- * Handles all the nasty defails like subtypes_addlist and friends.
+ * Handles all the nasty details like subtypes_addlist and friends.
  */
 class TcaTypesShowitem implements FormDataProviderInterface
 {
@@ -44,11 +44,6 @@ class TcaTypesShowitem implements FormDataProviderInterface
 
         $recordTypeValue = $result['recordTypeValue'];
 
-        // Inline may override the type value - setting is given down from InlineRecordContainer if so - used primarily for FAL
-        if (!empty($result['overruleTypesArray'][$recordTypeValue]['showitem'])) {
-            $result['processedTca']['types'][$recordTypeValue]['showitem'] = $result['overruleTypesArray'][$recordTypeValue]['showitem'];
-        }
-
         // Handle subtype_value_field, subtypes_addlist, subtypes_excludelist
         if (!empty($result['processedTca']['types'][$recordTypeValue]['subtype_value_field'])) {
             $subtypeFieldName = $result['processedTca']['types'][$recordTypeValue]['subtype_value_field'];
@@ -188,7 +183,7 @@ class TcaTypesShowitem implements FormDataProviderInterface
      */
     protected function removeFieldsByBitmaskExcludeBits(array $result, $bitmaskValue, $recordTypeValue)
     {
-        $removeListArray = array();
+        $removeListArray = [];
         $bitmaskValue = MathUtility::forceIntegerInRange($bitmaskValue, 0);
         $excludeListBitsArray = $this->processedTca['types'][$recordTypeValue]['bitmask_excludelist_bits'];
         foreach ($excludeListBitsArray as $bitKey => $excludeList) {
@@ -215,7 +210,7 @@ class TcaTypesShowitem implements FormDataProviderInterface
      */
     protected function removeFields(array $result, array $removeListArray, $recordTypeValue)
     {
-        $newFieldList = array();
+        $newFieldList = [];
         $showItemFieldString = $result['processedTca']['types'][$recordTypeValue]['showitem'];
         $showItemFieldArray = GeneralUtility::trimExplode(',', $showItemFieldString, true);
         foreach ($showItemFieldArray as $fieldConfigurationString) {
@@ -252,7 +247,7 @@ class TcaTypesShowitem implements FormDataProviderInterface
                 }
                 $showItemFieldString = $paletteArray['showitem'];
                 $showItemFieldArray = GeneralUtility::trimExplode(',', $showItemFieldString, true);
-                $newFieldList = array();
+                $newFieldList = [];
                 foreach ($showItemFieldArray as $fieldConfigurationString) {
                     $fieldConfigurationArray = GeneralUtility::trimExplode(';', $fieldConfigurationString);
                     $fieldName = $fieldConfigurationArray[0];