Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getPluginFromInput example
$this
->
validatePluginIsNotManagedByComposer
(
$pluginName
,
$context
)
;
try
{
$data
=
$this
->storeClient->
getDownloadDataForPlugin
(
$pluginName
,
$context
)
;
}
catch
(
ClientException
$exception
)
{
throw
new
StoreApiException
(
$exception
)
;
}
$this
->pluginManagementService->
downloadStorePlugin
(
$data
,
$context
)
;
try
{
$plugin
=
$this
->
getPluginFromInput
(
$pluginName
,
$context
)
;
if
(
$plugin
->
getUpgradeVersion
(
)
)
{
$this
->pluginLifecycleService->
updatePlugin
(
$plugin
,
$context
)
;
}
}
catch
(
PluginNotFoundException
)
{
// don't update plugins that are not installed
}
return
self::SUCCESS;
}