diff --git a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php index 0bfa17b36c0..2006ad2e61d 100644 --- a/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php @@ -77,7 +77,7 @@ protected function buildItems() foreach ($this->contentDimensionCombinator->getAllAllowedCombinations() as $allowedCombination) { $targetDimensions = $this->calculateTargetDimensionsForCombination($allowedCombination); - + $presets = $this->configurationContentDimensionPresetSource->findPresetsByTargetValues($allowedCombination); if ($pinnedDimensionName !== null && is_array($pinnedDimensionValues)) { if (!in_array($targetDimensions[$pinnedDimensionName], $pinnedDimensionValues)) { continue; @@ -105,13 +105,13 @@ protected function buildItems() } // determine metadata for target dimensions of node - array_walk($targetDimensions, static function (&$dimensionValue, $dimensionName, $allDimensionPresets) use ($pinnedDimensionName) { + array_walk($targetDimensions, static function (&$dimensionValue, $dimensionName) use ($pinnedDimensionName, $presets) { $dimensionValue = [ 'value' => $dimensionValue, - 'label' => $allDimensionPresets[$dimensionName]['presets'][$dimensionValue]['label'], + 'label' => $presets[$dimensionName]['label'], 'isPinnedDimension' => $pinnedDimensionName === null || $dimensionName == $pinnedDimensionName ]; - }, $allDimensionPresets); + }); $menuItems[] = [ 'node' => $nodeInDimensions,