Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setRatingSuccess example
$data
=
new
ProductDescriptionReviewsStruct
(
)
;
$slot
->
setData
(
$data
)
;
$productConfig
=
$slot
->
getFieldConfig
(
)
->
get
(
'product'
)
;
if
(
$productConfig
=== null
)
{
return
;
}
$request
=
$resolverContext
->
getRequest
(
)
;
$ratingSuccess
=
(bool)
$request
->
get
(
'success', false
)
;
$data
->
setRatingSuccess
(
$ratingSuccess
)
;
$product
= null;
if
(
$productConfig
->
isMapped
(
)
&&
$resolverContext
instanceof EntityResolverContext
)
{
$product
=
$this
->
resolveEntityValue
(
$resolverContext
->
getEntity
(
)
,
$productConfig
->
getStringValue
(
)
)
;
}
if
(
$productConfig
->
isStatic
(
)
)
{
$product
=
$this
->
getSlotProduct
(
$slot
,
$result
,
$productConfig
->
getStringValue
(
)
)
;
}