#[Package('inventory')]
class ProductNameCmsElementResolver extends AbstractProductDetailCmsElementResolver
{ public function getType(): string
{ return 'product-name';
} public function enrich(CmsSlotEntity
$slot, ResolverContext
$resolverContext, ElementDataCollection
$result): void
{ $text =
new TextStruct();
$slot->
setData($text);
$contentConfig =
$slot->
getFieldConfig()->
get('content'
);
if ($contentConfig === null
) { return;
} if ($contentConfig->
isStatic()) { $content =
$contentConfig->
getStringValue();
if ($resolverContext instanceof EntityResolverContext
) {