PHP Class Neos\Neos\Service\Mapping\NodePropertyConverterService

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$generatedPropertyMappingConfigurations array
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$propertyMapper Neos\Flow\Property\PropertyMapper
$systemLogger Neos\Flow\Log\SystemLoggerInterface
$typesConfiguration array

Public Methods

Method Description
getPropertiesArray ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array Get all properties reduced to simple type (no objects) representations in an array
getPropertiesJson ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string Get all properties as JSON encoded string representation
getProperty ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName ) : mixed Get a single property reduced to a simple type (no objects) representation

Protected Methods

Method Description
convertValue ( mixed $propertyValue, string $dataType ) : mixed
createConfiguration ( string $dataType ) : Neos\Flow\Property\PropertyMappingConfigurationInterface Create a property mapping configuration for the given dataType to convert a Node property value from the given dataType to a simple type.
getDefaultValueForProperty ( NodeType $nodeType, string $propertyName ) : mixed 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 setings.
setTypeConverterForType ( PropertyMappingConfiguration $propertyMappingConfiguration, string $dataType ) : boolean
setTypeConverterOptionsForType ( PropertyMappingConfiguration $propertyMappingConfiguration, string $typeConverterClass, string $dataType ) : void

Method Details

convertValue() protected method

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

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

getDefaultValueForProperty() protected method

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 setings.
protected getDefaultValueForProperty ( NodeType $nodeType, string $propertyName ) : mixed
$nodeType Neos\ContentRepository\Domain\Model\NodeType
$propertyName string
return mixed

getPropertiesArray() public method

Get all properties reduced to simple type (no objects) representations in an array
public getPropertiesArray ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : array
$node Neos\ContentRepository\Domain\Model\NodeInterface
return array

getPropertiesJson() public method

Get all properties as JSON encoded string representation
public getPropertiesJson ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : string
$node Neos\ContentRepository\Domain\Model\NodeInterface
return string

getProperty() public method

Get a single property reduced to a simple type (no objects) representation
public getProperty ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName ) : mixed
$node Neos\ContentRepository\Domain\Model\NodeInterface
$propertyName string
return mixed

setTypeConverterForType() protected method

protected setTypeConverterForType ( PropertyMappingConfiguration $propertyMappingConfiguration, string $dataType ) : boolean
$propertyMappingConfiguration Neos\Flow\Property\PropertyMappingConfiguration
$dataType string
return boolean

setTypeConverterOptionsForType() protected method

protected setTypeConverterOptionsForType ( PropertyMappingConfiguration $propertyMappingConfiguration, string $typeConverterClass, string $dataType ) : void
$propertyMappingConfiguration Neos\Flow\Property\PropertyMappingConfiguration
$typeConverterClass string
$dataType string
return void

Property Details

$generatedPropertyMappingConfigurations protected property

protected array $generatedPropertyMappingConfigurations
return array

$objectManager protected property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$propertyMapper protected property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
return Neos\Flow\Property\PropertyMapper

$systemLogger protected property

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
return Neos\Flow\Log\SystemLoggerInterface

$typesConfiguration protected property

protected array $typesConfiguration
return array