Everything is configured in Settings.yaml in path "Neos.ContentRepository.contentDimensions".
/** * @test */ public function findPresetByDimensionValuesWithoutExistingUriSegmentReturnsNull() { $source = new ConfigurationContentDimensionPresetSource(); $source->setConfiguration($this->validConfiguration); $preset = $source->findPresetByDimensionValues('language', array('ja_JP', 'mul_ZZ')); $this->assertNull($preset); }
/** * * @param array $allowedCombination * @param $allDimensionPresets * @return null|NodeInterface */ protected function findAcceptableNode(array $allowedCombination, array $allDimensionPresets) { $pinnedDimensionName = $this->getDimension(); foreach ($allowedCombination[$pinnedDimensionName] as $allowedPresetIdentifier) { $acceptableCombination = [$pinnedDimensionName => $allDimensionPresets[$pinnedDimensionName]['presets'][$allowedPresetIdentifier]['values']]; $allowedAdditionalPresets = $this->configurationContentDimensionPresetSource->getAllowedDimensionPresetsAccordingToPreselection('country', [$pinnedDimensionName => $allowedPresetIdentifier]); foreach ($allowedAdditionalPresets as $allowedAdditionalDimensionName => $allowedAdditionalPreset) { $acceptableCombination[$allowedAdditionalDimensionName] = $allowedAdditionalPreset['presets'][$allowedAdditionalPreset['defaultPreset']]['values']; } $nodeInDimensions = $this->getNodeInDimensions($acceptableCombination, []); if ($nodeInDimensions !== null) { return $nodeInDimensions; } } return null; }