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. |
Résultat | string | Class name of the media model to use for the given resource |
protected function applyModelMappingStrategy($originalTargetType, PersistentResource $resource, array $source = array())
{
$finalTargetType = $originalTargetType;
if (!isset($source['__type'])) {
$finalTargetType = $this->assetModelMappingStrategy->map($resource, $source);
}
return $finalTargetType;
}