Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MetaRequest example
$this
->
getCategoryService
(
)
->
synchronize
(
)
;
}
parent::
preDispatch
(
)
;
}
/** * @return void */
public
function
metaDownloadAction
(
)
{
try
{
$request
=
new
MetaRequest
(
$this
->
Request
(
)
->
getParam
(
'technicalName'
)
,
$this
->
getVersion
(
)
,
$this
->
getDomain
(
)
,
$this
->
getAccessToken
(
)
)
;
$result
=
$this
->
get
(
'shopware_plugininstaller.plugin_download_service'
)
->
getMetaInformation
(
$request
)
;
$this
->
get
(
'backendsession'
)
->
offsetSet
(
'plugin_manager_meta_download',
$result
)
;
}
catch
(
Exception
$e
)
{
$this
->
handleException
(
$e
)
;
$request
->
getTechnicalName
(
)
)
;
}
/** * @throws Exception * * @return bool */
public
function
download
(
DownloadRequest
$request
)
{
$metaRequest
=
new
MetaRequest
(
$request
->
getTechnicalName
(
)
,
$request
->
getShopwareVersion
(
)
,
$request
->
getDomain
(
)
,
$request
->
getToken
(
)
)
;
$result
=
$this
->
getMetaInformation
(
$metaRequest
)
;
$response
=
$this
->httpClient->
get
(
$result
->
getUri
(
)
)
;
$file
=
$this
->
createDownloadZip
(
$response
->
getBody
(
)
)
;