Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setAccessKey example
$entity
=
new
ProductExportEntity
(
)
;
$entity
->
setId
(
''
)
;
$entity
->
setHeaderTemplate
(
$dataBag
->
get
(
'headerTemplate'
)
?? ''
)
;
$entity
->
setBodyTemplate
(
$dataBag
->
get
(
'bodyTemplate'
)
?? ''
)
;
$entity
->
setFooterTemplate
(
$dataBag
->
get
(
'footerTemplate'
)
?? ''
)
;
$entity
->
setProductStreamId
(
$dataBag
->
get
(
'productStreamId'
)
)
;
$entity
->
setIncludeVariants
(
$dataBag
->
get
(
'includeVariants'
)
)
;
$entity
->
setEncoding
(
$dataBag
->
get
(
'encoding'
)
)
;
$entity
->
setFileFormat
(
$dataBag
->
get
(
'fileFormat'
)
)
;
$entity
->
setFileName
(
$dataBag
->
get
(
'fileName'
)
)
;
$entity
->
setAccessKey
(
$dataBag
->
get
(
'accessKey'
)
)
;
$entity
->
setSalesChannelId
(
$dataBag
->
get
(
'salesChannelId'
)
)
;
$entity
->
setSalesChannelDomainId
(
$dataBag
->
get
(
'salesChannelDomainId'
)
)
;
$entity
->
setCurrencyId
(
$dataBag
->
get
(
'currencyId'
)
)
;
return
$entity
;
}
private
function
generateExportPreview
(
RequestDataBag
$dataBag
, Context
$context
)
: ?ProductExportResult
{
$salesChannelDomain
=
$this
->
getSalesChannelDomain
(
$dataBag
->
get
(
'salesChannelDomainId'
)
,
$context
)
;
$salesChannel
=
$this
->
getSalesChannel
(
$dataBag
->
get
(
'salesChannelId'
)
,
$context
)
;