Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
updateLicences example
/** @var AccountManagerService $accountService */
$accountService
=
$this
->
get
(
\Shopware\Bundle\PluginInstallerBundle\Service\AccountManagerService::
class
)
;
$request
=
new
UpdateLicencesRequest
(
$this
->
getVersion
(
)
,
$this
->
getLocale
(
)
,
$accountService
->
getDomain
(
)
,
$this
->
getAccessToken
(
)
)
;
try
{
$result
=
$licenceService
->
updateLicences
(
$request
)
;
}
catch
(
Exception
$e
)
{
$this
->
handleException
(
$e
)
;
return
;
}
$plugins
=
$pluginCheck
->
checkInstalledPluginsAvailableForNewVersion
(
$this
->
getVersion
(
)
)
;
$updatable
=
array_filter
(
$plugins
,
function
D
$plugin
)
{
return
$plugin
[
'updatable'
]
;
}
)
;