AssetCollectionToArrayConverter
class AssetCollectionToArrayConverter extends AbstractTypeConverter (View source)
This converter transforms Neos.Media AssetCollection instances to arrays.
Properties
protected PersistenceManagerInterface | $persistenceManager | ||
protected array | $sourceTypes | ||
protected string | $targetType | ||
protected int | $priority |
Methods
bool
canConvertFrom(mixed $source, string $targetType)
No description
array
getSourceChildPropertiesToBeConverted(mixed $source)
Return a list of sub-properties inside the source object.
string
getTypeOfChildProperty(string $targetType, string $propertyName, PropertyMappingConfigurationInterface $configuration)
Return the type of a given sub-property inside the $targetType, in this case always "array"
array
convertFrom(AssetCollection $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
Convert an object from $source to an array
Details
bool
canConvertFrom(mixed $source, string $targetType)
No description
array
getSourceChildPropertiesToBeConverted(mixed $source)
Return a list of sub-properties inside the source object.
The "key" is the sub-property name, and the "value" is the value of the sub-property.
string
getTypeOfChildProperty(string $targetType, string $propertyName, PropertyMappingConfigurationInterface $configuration)
Return the type of a given sub-property inside the $targetType, in this case always "array"
array
convertFrom(AssetCollection $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
Convert an object from $source to an array