You are a developer and looking for Shopware projects?
Apply Now!
forwardDownloadError example
$esdID
=
(int)
$this
->request->
getParam
(
'esdID', 0
)
;
if
(
$esdID
=== 0
)
{
$this
->
forward
(
'downloads'
)
;
return
;
}
try
{
$download
=
$esdService
->
loadEsdOfCustomer
(
$this
->container->
get
(
'session'
)
->
offsetGet
(
'sUserId'
)
,
$esdID
)
;
}
catch
(
EsdNotFoundException
$exception
)
{
$this
->
forwardDownloadError
(
1
)
;
return
;
}
if
(
empty
(
$download
->
getFile
(
)
)
)
{
$this
->
forwardDownloadError
(
1
)
;
return
;
}
$filePath
=
$esdService
->
getLocation
(
$download
)
;