[BUGFIX] IRRE: expandAll show content of all children 95/44695/3
authorAndreas Allacher <andreas@allacher.com>
Thu, 12 Nov 2015 16:27:22 +0000 (17:27 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 13 Nov 2015 10:53:05 +0000 (11:53 +0100)
The \TYPO3\CMS\Backend\Form\FormDataProvider\TcaColumnsProcessShowitem
data provider has to ensure that if expandAll for IRRE (collapseAll = false)
is used that every child is rendered, instead of only those with the
expanded state.

Change-Id: I985437668554e568623f947639edddd9cb1b1530
Resolves: #71523
Releases: master
Reviewed-on: https://review.typo3.org/44695
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaColumnsProcessShowitem.php

index b114712..bf26c93 100644 (file)
@@ -53,12 +53,13 @@ class TcaColumnsProcessShowitem implements FormDataProviderInterface
             $isExistingRecord = $result['command'] === 'edit';
             $inlineConfig = $result['inlineParentConfig'];
             $collapseAll = isset($inlineConfig['appearance']['collapseAll']) && $inlineConfig['appearance']['collapseAll'];
+            $expandAll = isset($inlineConfig['appearance']['collapseAll']) && !$inlineConfig['appearance']['collapseAll'];
             $expandCollapseStateArray = $result['inlineExpandCollapseStateArray'];
             $foreignTable = $result['inlineParentConfig']['foreign_table'];
             $isExpandedByUcState = isset($expandCollapseStateArray[$foreignTable])
                     && is_array($expandCollapseStateArray[$foreignTable])
                     && in_array($result['databaseRow']['uid'], $expandCollapseStateArray[$foreignTable]) !== false;
-            if ($isExistingRecord && ($collapseAll || !$isExpandedByUcState) && !$result['isInlineAjaxOpeningContext']) {
+            if ($isExistingRecord && ($collapseAll || !$isExpandedByUcState) && !$expandAll && !$result['isInlineAjaxOpeningContext']) {
                 $addShowItemFieldsToColumnsToProcess = false;
             }
         }