PHP Class Neos\ContentRepository\Domain\Service\ConfigurationContentDimensionPresetSource

Everything is configured in Settings.yaml in path "Neos.ContentRepository.contentDimensions".
Inheritance: implements Neos\ContentRepository\Domain\Service\ContentDimensionPresetSourceInterface
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$configuration array Dimension presets configuration indexed by dimension name, see ContentDimensionPresetSourceInterface

Méthodes publiques

Méthode Description
findPresetByDimensionValues ( $dimensionName, array $dimensionValues )
findPresetsByTargetValues ( array $targetValues )
getAllPresets ( )
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 ( $dimensionName )
isPresetCombinationAllowedByConstraints ( array $dimensionsNamesAndPresetIdentifiers ) : boolean Checks if the given combination of presets is allowed, according to possibly defined constraints in the content dimension configuration.
setConfiguration ( array $configuration ) : void

Méthodes protégées

Méthode Description
comparePresetsForTargetValue ( array $possibleBetterPreset, array $targetValues, array $currentBestPreset = null ) : array Compares the given $possibleBetterPreset to the $targetValues (based on the position of the contained values) and returns either $possibleBetterPreset or the $currentBestPreset, depending on the result.
isPresetAllowedByConstraints ( string $dimensionName, string $presetIdentifier, array $constraints ) : boolean Checks if the given preset of the specified dimension is allowed according to the given constraints

Method Details

comparePresetsForTargetValue() protected méthode

Compares the given $possibleBetterPreset to the $targetValues (based on the position of the contained values) and returns either $possibleBetterPreset or the $currentBestPreset, depending on the result.
protected comparePresetsForTargetValue ( array $possibleBetterPreset, array $targetValues, array $currentBestPreset = null ) : array
$possibleBetterPreset array
$targetValues array
$currentBestPreset array
Résultat array

findPresetByDimensionValues() public méthode

public findPresetByDimensionValues ( $dimensionName, array $dimensionValues )
$dimensionValues array

findPresetsByTargetValues() public méthode

public findPresetsByTargetValues ( array $targetValues )
$targetValues array

getAllPresets() public méthode

public getAllPresets ( )

getAllowedDimensionPresetsAccordingToPreselection() public méthode

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
Résultat array An array of presets only for the dimension specified in $dimensionName. Structure is: array($dimensionName => array('presets' => array(...))

getDefaultPreset() public méthode

public getDefaultPreset ( $dimensionName )

isPresetAllowedByConstraints() protected méthode

Checks if the given preset of the specified dimension is allowed according to the given constraints
protected isPresetAllowedByConstraints ( string $dimensionName, string $presetIdentifier, array $constraints ) : boolean
$dimensionName string Name of the dimension the preset belongs to
$presetIdentifier string Identifier of the preset to check
$constraints array Constraints to use for the check
Résultat boolean

isPresetCombinationAllowedByConstraints() public méthode

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')
Résultat boolean

setConfiguration() public méthode

public setConfiguration ( array $configuration ) : void
$configuration array
Résultat void

Property Details

$configuration protected_oe property

Dimension presets configuration indexed by dimension name, see ContentDimensionPresetSourceInterface
protected array $configuration
Résultat array