PHP 인터페이스 Neos\ContentRepository\Domain\Service\ContentDimensionPresetSourceInterface

It allows to find a matching preset for a list of dimension values. Or calculate all dimension combinations for you (the matrix of all configured presets). Content Dimension Preset ======================== A Content Dimension Preset assigns an identifier to a (fallback) list of dimension values. It can have additional properties like UI label and icon and further options for routing if needed. The default implementation ConfigurationContentDimensionPresetSource will read the available presets from settings.
파일 보기 프로젝트 열기: neos/neos-development-collection 0 사용 예제들

공개 메소드들

메소드 설명
findPresetByDimensionValues ( string $dimensionName, array $dimensionValues ) : array Find a dimension preset by dimension values
findPresetsByTargetValues ( array $targetValues ) : array Finds for each configured dimension the best matching preset based on given target value for that dimension.
getAllPresets ( ) : array Get the full presets configuration as an array
getAllowedDimensionPresetsAccordingToPreselection ( string $dimensionName, array $preselectedDimensionPresets ) : array Returns a list of presets of the specified dimension which are allowed in combination with the given presets of other dimensions.
getDefaultPreset ( string $dimensionName ) : array Get the default preset of a dimension
isPresetCombinationAllowedByConstraints ( array $dimensionsNamesAndPresetIdentifiers ) : boolean Checks if the given combination of presets is allowed, according to possibly defined constraints in the content dimension configuration.

메소드 상세

findPresetByDimensionValues() 공개 메소드

Find a dimension preset by dimension values
public findPresetByDimensionValues ( string $dimensionName, array $dimensionValues ) : array
$dimensionName string
$dimensionValues array
리턴 array The preset configuration, including the identifier as key "identifier" or NULL if none was found

findPresetsByTargetValues() 공개 메소드

The $targetValues array should have the dimension as key and the target value (single value) as value.
public findPresetsByTargetValues ( array $targetValues ) : array
$targetValues array
리턴 array

getAllPresets() 공개 메소드

Example: 'language': defaultPreset: 'all' label: 'Language' icon: 'icon-language' presets: 'all': label: 'All languages' values: ['mul_ZZ'] uriSegment: 'intl' 'de_DE': label: 'Deutsch (Deutschland)' values: ['de_DE', 'de_ZZ', 'mul_ZZ'] uriSegment: 'deutsch'
public getAllPresets ( ) : array
리턴 array Presets configuration, indexed by dimension identifier

getAllowedDimensionPresetsAccordingToPreselection() 공개 메소드

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

getDefaultPreset() 공개 메소드

Get the default preset of a dimension
public getDefaultPreset ( string $dimensionName ) : array
$dimensionName string The dimension name where the default preset should be returned
리턴 array The preset configuration, including the identifier as key "identifier"

isPresetCombinationAllowedByConstraints() 공개 메소드

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