Neos.Neos/Classes/Controller/Backend/ContentController.php
public function createImageVariantAction(ImageVariant $asset)
    {
        if ($this->persistenceManager->isNewObject($asset)) {
            $this->assetRepository->add($asset);
        }

        $propertyMappingConfiguration = new PropertyMappingConfiguration();
        // This will not be sent as "application/json" as we need the JSON string and not the single variables.
        return json_encode($this->entityToIdentityConverter->convertFrom($asset, 'array', [], $propertyMappingConfiguration));
    }
public function createImageVariantAction(ImageVariant $asset)
    {
        if ($this->persistenceManager->isNewObject($asset)) {
            $this->assetRepository->add($asset);
        }

        $propertyMappingConfiguration = new PropertyMappingConfiguration();
        // This will not be sent as "application/json" as we need the JSON string and not the single variables.
        return json_encode($this->entityToIdentityConverter->convertFrom($asset, 'array', [], $propertyMappingConfiguration));
    }
public function createImageVariantAction ( ImageVariant $ asset ) { if ( $ this -> persistenceManager -> isNewObject ( $ asset ) ) { $ this -> assetRepository -> add ( $ asset ) ; } $ propertyMappingConfiguration = new PropertyMappingConfiguration ( ) ; // This will not be sent as "application/json" as we need the JSON string and not the single variables. return json_encode ( $ this -> entityToIdentityConverter -> convertFrom ( $ asset , 'array' , [ ] , $ propertyMappingConfiguration ) ) ; }
Generate a new image variant from given data.

@param ImageVariant $asset
@return string
Generate a new image variant from given data .