Neos.ContentRepository/Classes/Domain/Service/ConfigurationContentDimensionPresetSource.php
public function getAllowedDimensionPresetsAccordingToPreselection($dimensionName, array $preselectedDimensionPresets)
    {
        if (!isset($this->configuration[$dimensionName])) {
            return null;
        }

        $dimensionConfiguration = [$dimensionName => $this->configuration[$dimensionName]];
        $sorter = new PositionalArraySorter($dimensionConfiguration[$dimensionName]['presets']);
        $dimensionConfiguration[$dimensionName]['presets'] = $sorter->toArray();

        foreach (array_keys($dimensionConfiguration[$dimensionName]['presets']) as $presetIdentifier) {
            $currentPresetCombination = $preselectedDimensionPresets;
            $currentPresetCombination[$dimensionName] = $presetIdentifier;
            if (!$this->isPresetCombinationAllowedByConstraints($currentPresetCombination)) {
                unset($dimensionConfiguration[$dimensionName]['presets'][$presetIdentifier]);
            }
        }

        return $dimensionConfiguration;
    }
public function getAllowedDimensionPresetsAccordingToPreselection($dimensionName, array $preselectedDimensionPresets)
    {
        if (!isset($this->configuration[$dimensionName])) {
            return null;
        }

        $dimensionConfiguration = [$dimensionName => $this->configuration[$dimensionName]];
        $sorter = new PositionalArraySorter($dimensionConfiguration[$dimensionName]['presets']);
        $dimensionConfiguration[$dimensionName]['presets'] = $sorter->toArray();

        foreach (array_keys($dimensionConfiguration[$dimensionName]['presets']) as $presetIdentifier) {
            $currentPresetCombination = $preselectedDimensionPresets;
            $currentPresetCombination[$dimensionName] = $presetIdentifier;
            if (!$this->isPresetCombinationAllowedByConstraints($currentPresetCombination)) {
                unset($dimensionConfiguration[$dimensionName]['presets'][$presetIdentifier]);
            }
        }

        return $dimensionConfiguration;
    }
public function getAllowedDimensionPresetsAccordingToPreselection ( $ dimensionName , array $ preselectedDimensionPresets ) { if ( ! isset ( $ this -> configuration [ $ dimensionName ] ) ) { return null ; } $ dimensionConfiguration = [ $ dimensionName => $ this -> configuration [ $ dimensionName ] ] ; $ sorter = new PositionalArraySorter ( $ dimensionConfiguration [ $ dimensionName ] [ 'presets' ] ) ; $ dimensionConfiguration [ $ dimensionName ] [ 'presets' ] = $ sorter -> toArray ( ) ; foreach ( array_keys ( $ dimensionConfiguration [ $ dimensionName ] [ 'presets' ] ) as $ presetIdentifier ) { $ currentPresetCombination = $ preselectedDimensionPresets ; $ currentPresetCombination [ $ dimensionName ] = $ presetIdentifier ; if ( ! $ this -> isPresetCombinationAllowedByConstraints ( $ currentPresetCombination ) ) { unset ( $ dimensionConfiguration [ $ dimensionName ] [ 'presets' ] [ $ presetIdentifier ] ) ; } } return $ dimensionConfiguration ; }
Returns a list of presets of the specified dimension which are allowed in combination with the given presets
of other dimensions.

@param string $dimensionName Name of the dimension to return presets for
@param array $preselectedDimensionPresets An array of dimension name and preset identifier specifying the presets which are already selected
@return array An array of presets only for the dimension specified in $dimensionName. Structure is: array($dimensionName => array('presets' => array(...))
Returns a list of presets of the specified dimension which are allowed in combination with the given presets of other dimensions .