Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validatePluginIsNotManagedByComposer example
protected
function
execute
(
InputInterface
$input
, OutputInterface
$output
)
: int
{
$context
= Context::
createDefaultContext
(
)
;
$pluginName
=
(string)
$input
->
getOption
(
'pluginName'
)
;
$user
=
$input
->
getOption
(
'user'
)
;
$context
=
$this
->
getUserContextFromInput
(
$user
,
$context
)
;
$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
)
;