Neos\Media\TypeConverter\ImageInterfaceJsonSerializer::convertFrom PHP Метод

convertFrom() публичный Метод

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
$source Neos\Media\Domain\Model\ImageInterface
$targetType string must be 'string'
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат string The converted ImageInterface
    public function convertFrom($source, $targetType, array $convertedChildProperties = array(), PropertyMappingConfigurationInterface $configuration = null)
    {
        $data = parent::convertFrom($source, 'array', $convertedChildProperties, $configuration);
        return json_encode($data);
    }
ImageInterfaceJsonSerializer