class NodePropertyConverterService (View source)

Creates PropertyMappingConfigurations to map NodeType properties for the Neos interface.

Properties

protected array $typesConfiguration
protected ObjectManagerInterface $objectManager
protected PropertyMapper $propertyMapper
protected array $generatedPropertyMappingConfigurations

Methods

injectLogger(LoggerInterface $logger)

No description

injectThrowableStorage(ThrowableStorageInterface $throwableStorage)

No description

mixed
getProperty(NodeInterface $node, string $propertyName)

Get a single property reduced to a simple type (no objects) representation

string
getPropertiesJson(NodeInterface $node)

Get all properties as JSON encoded string representation

array
getPropertiesArray(NodeInterface $node)

Get all properties reduced to simple type (no objects) representations in an array

mixed
convertValue(mixed $propertyValue, string $dataType)

Convert the given value to a simple type or an array of simple types.

mixed
getDefaultValueForProperty(NodeType $nodeType, string $propertyName)

Tries to find a default value for the given property trying: 1) The specific property configuration for the given NodeType 2) The generic configuration for the property type in settings.

PropertyMappingConfigurationInterface
createConfiguration(string $dataType)

Create a property mapping configuration for the given dataType to convert a Node property value from the given dataType to a simple type.

bool
setTypeConverterForType(PropertyMappingConfiguration $propertyMappingConfiguration, string $dataType)

No description

void
setTypeConverterOptionsForType(PropertyMappingConfiguration $propertyMappingConfiguration, string $typeConverterClass, string $dataType)

No description

Details

injectLogger(LoggerInterface $logger)

No description

Parameters

LoggerInterface $logger

injectThrowableStorage(ThrowableStorageInterface $throwableStorage)

No description

Parameters

ThrowableStorageInterface $throwableStorage

mixed getProperty(NodeInterface $node, string $propertyName)

Get a single property reduced to a simple type (no objects) representation

Parameters

NodeInterface $node
string $propertyName

Return Value

mixed

string getPropertiesJson(NodeInterface $node)

Get all properties as JSON encoded string representation

Parameters

NodeInterface $node

Return Value

string

array getPropertiesArray(NodeInterface $node)

Get all properties reduced to simple type (no objects) representations in an array

Parameters

NodeInterface $node

Return Value

array

protected mixed convertValue(mixed $propertyValue, string $dataType)

Convert the given value to a simple type or an array of simple types.

Parameters

mixed $propertyValue
string $dataType

Return Value

mixed

Exceptions

Exception

protected mixed getDefaultValueForProperty(NodeType $nodeType, string $propertyName)

Tries to find a default value for the given property trying: 1) The specific property configuration for the given NodeType 2) The generic configuration for the property type in settings.

Parameters

NodeType $nodeType
string $propertyName

Return Value

mixed

protected PropertyMappingConfigurationInterface createConfiguration(string $dataType)

Create a property mapping configuration for the given dataType to convert a Node property value from the given dataType to a simple type.

Parameters

string $dataType

Return Value

PropertyMappingConfigurationInterface

protected bool setTypeConverterForType(PropertyMappingConfiguration $propertyMappingConfiguration, string $dataType)

No description

Parameters

PropertyMappingConfiguration $propertyMappingConfiguration
string $dataType

Return Value

bool

protected void setTypeConverterOptionsForType(PropertyMappingConfiguration $propertyMappingConfiguration, string $typeConverterClass, string $dataType)

No description

Parameters

PropertyMappingConfiguration $propertyMappingConfiguration
string $typeConverterClass
string $dataType

Return Value

void