Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
resolveEntityValues example
return
;
}
$content
= null;
if
(
$config
->
isMapped
(
)
&&
$resolverContext
instanceof EntityResolverContext
)
{
$content
=
$this
->
resolveEntityValueToString
(
$resolverContext
->
getEntity
(
)
,
$config
->
getStringValue
(
)
,
$resolverContext
)
;
}
if
(
$config
->
isStatic
(
)
)
{
if
(
$resolverContext
instanceof EntityResolverContext
)
{
$content
=
(string)
$this
->
resolveEntityValues
(
$resolverContext
,
$config
->
getStringValue
(
)
)
;
}
else
{
$content
=
$config
->
getStringValue
(
)
;
}
}
if
(
$content
!== null
)
{
$text
->
setContent
(
$this
->sanitizer->
sanitize
(
$content
)
)
;
}
}
}
$slot
->
setData
(
$text
)
;
$contentConfig
=
$slot
->
getFieldConfig
(
)
->
get
(
'content'
)
;
if
(
$contentConfig
=== null
)
{
return
;
}
if
(
$contentConfig
->
isStatic
(
)
)
{
$content
=
$contentConfig
->
getStringValue
(
)
;
if
(
$resolverContext
instanceof EntityResolverContext
)
{
$content
=
(string)
$this
->
resolveEntityValues
(
$resolverContext
,
$content
)
;
}
$text
->
setContent
(
$content
)
;
return
;
}
if
(
$contentConfig
->
isMapped
(
)
&&
$resolverContext
instanceof EntityResolverContext
)
{
$content
=
$this
->
resolveEntityValue
(
$resolverContext
->
getEntity
(
)
,
$contentConfig
->
getStringValue
(
)
)
;
$text
->
setContent
(
(string)
$content
)
;
}