PHP Class Neos\Media\TypeConverter\ImageInterfaceArrayPresenter

Inheritance: extends Neos\Flow\Property\TypeConverter\AbstractTypeConverter
Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$priority integer
$sourceTypes array
$targetType string

Public Methods

Method Description
canConvertFrom ( mixed $source, string $targetType ) : boolean If $source has an identity, we have a persisted Image, and therefore this type converter should withdraw and let the PersistedObjectConverter kick in.
convertFrom ( Neos\Media\Domain\Model\ImageInterface $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string | Error Convert an object from \Neos\Media\Domain\Model\ImageInterface to a json representation
getSourceChildPropertiesToBeConverted ( mixed $source ) : array Convert all properties in the source array

Method Details

canConvertFrom() public method

If $source has an identity, we have a persisted Image, and therefore this type converter should withdraw and let the PersistedObjectConverter kick in.
public canConvertFrom ( mixed $source, string $targetType ) : boolean
$source mixed The source for the to-build Image
$targetType string Should always be 'string'
return boolean

convertFrom() public method

Convert an object from \Neos\Media\Domain\Model\ImageInterface to a json representation
public convertFrom ( Neos\Media\Domain\Model\ImageInterface $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string | Error
$source Neos\Media\Domain\Model\ImageInterface
$targetType string must be 'string'
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
return string | Neos\Flow\Validation\Error The converted Image, a Validation Error or NULL

getSourceChildPropertiesToBeConverted() public method

Convert all properties in the source array
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array
$source mixed
return array

Property Details

$persistenceManager protected property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$priority protected property

protected int $priority
return integer

$sourceTypes protected property

protected array $sourceTypes
return array

$targetType protected property

protected string $targetType
return string