Neos\Neos\Service\Mapping\NodePropertyConverterService::createConfiguration PHP Method

createConfiguration() protected method

Create a property mapping configuration for the given dataType to convert a Node property value from the given dataType to a simple type.
protected createConfiguration ( string $dataType ) : Neos\Flow\Property\PropertyMappingConfigurationInterface
$dataType string
return Neos\Flow\Property\PropertyMappingConfigurationInterface
    protected function createConfiguration($dataType)
    {
        if (!isset($this->generatedPropertyMappingConfigurations[$dataType])) {
            $propertyMappingConfiguration = new PropertyMappingConfiguration();
            $propertyMappingConfiguration->allowAllProperties();
            $parsedType = ['elementType' => null, 'type' => $dataType];
            // Special handling for "reference(s)", should be deprecated and normlized to array<NodeInterface>
            if ($dataType !== 'references' && $dataType !== 'reference') {
                $parsedType = TypeHandling::parseType($dataType);
            }
            if ($this->setTypeConverterForType($propertyMappingConfiguration, $dataType) === false) {
                $this->setTypeConverterForType($propertyMappingConfiguration, $parsedType['type']);
            }
            $elementConfiguration = $propertyMappingConfiguration->forProperty('*');
            $this->setTypeConverterForType($elementConfiguration, $parsedType['elementType']);
            $this->generatedPropertyMappingConfigurations[$dataType] = $propertyMappingConfiguration;
        }
        return $this->generatedPropertyMappingConfigurations[$dataType];
    }