Neos.ContentRepository/Classes/Domain/Service/ConfigurationContentDimensionPresetSource.php
public function isPresetCombinationAllowedByConstraints(array $dimensionsNamesAndPresetIdentifiers)
    {
        foreach ($dimensionsNamesAndPresetIdentifiers as $dimensionName => $presetIdentifier) {
            if (!isset($this->configuration[$dimensionName]) || !isset($this->configuration[$dimensionName]['presets'][$presetIdentifier])) {
                return false;
            }
            foreach ($this->configuration as $currentDimensionName => $dimensionConfiguration) {
                if (!isset($dimensionsNamesAndPresetIdentifiers[$currentDimensionName])) {
                    continue;
                }
                $currentPresetIdentifier = $dimensionsNamesAndPresetIdentifiers[$currentDimensionName];
                if (isset($dimensionConfiguration['presets'][$currentPresetIdentifier]['constraints'])) {
                    $constraintsResult = $this->isPresetAllowedByConstraints($dimensionName, $presetIdentifier, $dimensionConfiguration['presets'][$currentPresetIdentifier]['constraints']);
                    if ($constraintsResult === false) {
                        return false;
                    }
                }
            }
        }

        return true;
    }
public function isPresetCombinationAllowedByConstraints(array $dimensionsNamesAndPresetIdentifiers)
    {
        foreach ($dimensionsNamesAndPresetIdentifiers as $dimensionName => $presetIdentifier) {
            if (!isset($this->configuration[$dimensionName]) || !isset($this->configuration[$dimensionName]['presets'][$presetIdentifier])) {
                return false;
            }
            foreach ($this->configuration as $currentDimensionName => $dimensionConfiguration) {
                if (!isset($dimensionsNamesAndPresetIdentifiers[$currentDimensionName])) {
                    continue;
                }
                $currentPresetIdentifier = $dimensionsNamesAndPresetIdentifiers[$currentDimensionName];
                if (isset($dimensionConfiguration['presets'][$currentPresetIdentifier]['constraints'])) {
                    $constraintsResult = $this->isPresetAllowedByConstraints($dimensionName, $presetIdentifier, $dimensionConfiguration['presets'][$currentPresetIdentifier]['constraints']);
                    if ($constraintsResult === false) {
                        return false;
                    }
                }
            }
        }

        return true;
    }
public function isPresetCombinationAllowedByConstraints ( array $ dimensionsNamesAndPresetIdentifiers ) { foreach ( $ dimensionsNamesAndPresetIdentifiers as $ dimensionName => $ presetIdentifier ) { if ( ! isset ( $ this -> configuration [ $ dimensionName ] ) || ! isset ( $ this -> configuration [ $ dimensionName ] [ 'presets' ] [ $ presetIdentifier ] ) ) { return false ; } foreach ( $ this -> configuration as $ currentDimensionName => $ dimensionConfiguration ) { if ( ! isset ( $ dimensionsNamesAndPresetIdentifiers [ $ currentDimensionName ] ) ) { continue ; } $ currentPresetIdentifier = $ dimensionsNamesAndPresetIdentifiers [ $ currentDimensionName ] ; if ( isset ( $ dimensionConfiguration [ 'presets' ] [ $ currentPresetIdentifier ] [ 'constraints' ] ) ) { $ constraintsResult = $ this -> isPresetAllowedByConstraints ( $ dimensionName , $ presetIdentifier , $ dimensionConfiguration [ 'presets' ] [ $ currentPresetIdentifier ] [ 'constraints' ] ) ; if ( $ constraintsResult === false ) { return false ; } } } } return true ; }
Checks if the given combination of presets is allowed, according to possibly defined constraints in the
content dimension configuration.

@param array $dimensionsNamesAndPresetIdentifiers Preset pairs, for example array('language' => 'de', 'country' => 'GER', 'persona' => 'clueless')
@return boolean
Checks if the given combination of presets is allowed according to possibly defined constraints in the content dimension configuration .