Property | Type | Description | |
---|---|---|---|
$assetModelMappingStrategy | Neos\Media\Domain\Strategy\AssetModelMappingStrategyInterface | ||
$assetRepository | |||
$defaultNewAssetType | string | If creating a new asset from this converter this defines the default type as fallback. | |
$persistenceManager | Neos\Flow\Persistence\PersistenceManagerInterface | ||
$priority | integer | ||
$resourceManager | |||
$resourcesAlreadyConvertedToAssets | array | Maps resource identifiers to assets that already got created during the current request. | |
$sourceTypes | array | ||
$targetType | string |
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 ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : |
Convert an object from $source to an \Neos\Media\Domain\Model\AssetInterface implementation | |
getSourceChildPropertiesToBeConverted ( mixed $source ) : array | All properties in the source array except __identity and adjustments are sub-properties. | |
getTargetTypeForSource ( mixed $source, string $originalTargetType, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string | Determines the target type based on the source's (optional) __type key. | |
getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string | Convert the property "resource" |
Method | Description | |
---|---|---|
applyModelMappingStrategy ( string $originalTargetType, |
Applies the model mapping strategy for a converted resource to determine the final target type. | |
applyTypeSpecificHandling ( Neos\Media\Domain\Model\AssetInterface $asset, mixed $source, array $convertedChildProperties, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : Neos\Media\Domain\Model\AssetInterface | null | ||
buildObject ( array &$possibleConstructorArgumentValues, string $objectType ) : object | Builds a new instance of $objectType with the given $possibleConstructorArgumentValues. | |
fetchObjectFromPersistence ( mixed $identity, string $targetType ) : object | Fetch an object from persistence layer. |
protected applyModelMappingStrategy ( string $originalTargetType, |
||
$originalTargetType | string | The original target type determined so far |
$resource | The resource that is to be converted to a media file. | |
$source | array | the original source properties for this type converter. |
return | string | Class name of the media model to use for the given resource |
protected applyTypeSpecificHandling ( Neos\Media\Domain\Model\AssetInterface $asset, mixed $source, array $convertedChildProperties, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : Neos\Media\Domain\Model\AssetInterface | null | ||
$asset | Neos\Media\Domain\Model\AssetInterface | |
$source | mixed | |
$convertedChildProperties | array | |
$configuration | Neos\Flow\Property\PropertyMappingConfigurationInterface | |
return | Neos\Media\Domain\Model\AssetInterface | null |
public convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : |
||
$source | mixed | |
$targetType | string | must implement 'Neos\Media\Domain\Model\AssetInterface' |
$convertedChildProperties | array | |
$configuration | Neos\Flow\Property\PropertyMappingConfigurationInterface | |
return | The converted Asset, a Validation Error or NULL |
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array | ||
$source | mixed | |
return | array |
protected AssetModelMappingStrategyInterface,Neos\Media\Domain\Strategy $assetModelMappingStrategy | ||
return | Neos\Media\Domain\Strategy\AssetModelMappingStrategyInterface |
protected AssetRepository,Neos\Media\Domain\Repository $assetRepository | ||
return |
protected static string $defaultNewAssetType | ||
return | string |
protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager | ||
return | Neos\Flow\Persistence\PersistenceManagerInterface |
protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager | ||
return |
protected array $resourcesAlreadyConvertedToAssets | ||
return | array |