PHP Class Neos\Media\TypeConverter\ArrayConverter

Inheritance: extends Neos\Flow\Property\TypeConverter\AbstractTypeConverter
Afficher le fichier Open project: neos/neos-development-collection

Protected Properties

Свойство Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$priority integer
$sourceTypes array
$targetType string

Méthodes publiques

Méthode Description
canConvertFrom ( mixed $source, string $targetType ) : boolean
convertFrom ( Neos\Media\Domain\Model\AssetInterface $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array Convert an object from $source to an array
getSourceChildPropertiesToBeConverted ( mixed $source ) : array Return a list of sub-properties inside the source object.
getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string Return the type of a given sub-property inside the $targetType, in this case always "array"

Method Details

canConvertFrom() public méthode

public canConvertFrom ( mixed $source, string $targetType ) : boolean
$source mixed
$targetType string
Résultat boolean

convertFrom() public méthode

Convert an object from $source to an array
public convertFrom ( Neos\Media\Domain\Model\AssetInterface $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array
$source Neos\Media\Domain\Model\AssetInterface
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Résultat array The converted asset or NULL

getSourceChildPropertiesToBeConverted() public méthode

The "key" is the sub-property name, and the "value" is the value of the sub-property.
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array
$source mixed
Résultat array

getTypeOfChildProperty() public méthode

Return the type of a given sub-property inside the $targetType, in this case always "array"
public getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string
$targetType string is ignored
$propertyName string is ignored
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface is ignored
Résultat string always "array"

Property Details

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Résultat Neos\Flow\Persistence\PersistenceManagerInterface

$priority protected_oe property

protected int $priority
Résultat integer

$sourceTypes protected_oe property

protected array $sourceTypes
Résultat array

$targetType protected_oe property

protected string $targetType
Résultat string