if ($mediaConfig !== null
) { $media =
$this->
getMedia($slot,
$result,
$mediaConfig,
$resolverContext);
if ($media !== null
) { $manufacturerStruct->
setMedia($media);
$manufacturerStruct->
setMediaId($media->
getId());
} } if ($resolverContext instanceof EntityResolverContext &&
$resolverContext->
getDefinition() instanceof SalesChannelProductDefinition
) { /** @var SalesChannelProductEntity $product */
$product =
$resolverContext->
getEntity();
$manufacturerStruct->
setManufacturer($product->
getManufacturer());
} } private function getConfigUrl(FieldConfig
$config, ResolverContext
$resolverContext): ?string
{ if ($config->
isStatic()) { return $config->
getStringValue();
} if (!
$resolverContext instanceof EntityResolverContext
) { return null;
}