class TagToArrayConverter extends AbstractTypeConverter (View source)

This converter transforms Neos.Media Tag 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(Tag $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

Parameters

mixed $source
string $targetType

Return Value

bool

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.

Parameters

mixed $source

Return Value

array

string getTypeOfChildProperty(string $targetType, string $propertyName, PropertyMappingConfigurationInterface $configuration)

Return the type of a given sub-property inside the $targetType, in this case always "array"

Parameters

string $targetType

is ignored

string $propertyName

is ignored

PropertyMappingConfigurationInterface $configuration

is ignored

Return Value

string

always "array"

array convertFrom(Tag $source, string $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)

Convert an object from $source to an array

Parameters

Tag $source
string $targetType
array $convertedChildProperties
PropertyMappingConfigurationInterface $configuration

Return Value

array

The converted tag or NULL