PHP Класс Neos\ContentRepository\Domain\Service\ConfigurationContentDimensionPresetSource

Everything is configured in Settings.yaml in path "Neos.ContentRepository.contentDimensions".
Наследование: implements Neos\ContentRepository\Domain\Service\ContentDimensionPresetSourceInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$configuration array Dimension presets configuration indexed by dimension name, see ContentDimensionPresetSourceInterface

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Описание методов

comparePresetsForTargetValue() защищенный Метод

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
Результат array

findPresetByDimensionValues() публичный Метод

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

findPresetsByTargetValues() публичный Метод

public findPresetsByTargetValues ( array $targetValues )
$targetValues array

getAllPresets() публичный Метод

public getAllPresets ( )

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() публичный Метод

public getDefaultPreset ( $dimensionName )

isPresetAllowedByConstraints() защищенный Метод

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
Результат boolean

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

setConfiguration() публичный Метод

public setConfiguration ( array $configuration ) : void
$configuration array
Результат void

Описание свойств

$configuration защищенное свойство

Dimension presets configuration indexed by dimension name, see ContentDimensionPresetSourceInterface
protected array $configuration
Результат array