PHP Class Neos\Flow\Property\TypeConverter\CollectionConverter

The input will be transformed to the element type given with the $targetType (Type) using available type converters and the result will be used to populate a Doctrine ArrayCollection.
Inheritance: extends AbstractTypeConverter
Mostra file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$priority integer
$sourceTypes array
$targetType string

Public Methods

Method Description
convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : ArrayCollection Actually convert from $source to $targetType, taking into account the fully built $convertedChildProperties and $configuration.
getSourceChildPropertiesToBeConverted ( mixed $source ) : array Returns the source, if it is an array, otherwise an empty array.
getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string Return the type of a given sub-property inside the $targetType

Method Details

convertFrom() public method

Actually convert from $source to $targetType, taking into account the fully built $convertedChildProperties and $configuration.
public convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : ArrayCollection
$source mixed
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
return Doctrine\Common\Collections\ArrayCollection

getSourceChildPropertiesToBeConverted() public method

Returns the source, if it is an array, otherwise an empty array.
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array
$source mixed
return array

getTypeOfChildProperty() public method

Return the type of a given sub-property inside the $targetType
public getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string
$targetType string
$propertyName string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
return string

Property Details

$priority protected_oe property

protected int $priority
return integer

$sourceTypes protected_oe property

protected array $sourceTypes
return array

$targetType protected_oe property

protected string $targetType
return string