Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
PluginHasActiveDependantsException example
throw
new
PluginNotActivatedException
(
$plugin
->
getName
(
)
)
;
}
$dependantPlugins
=
$this
->
getEntities
(
$this
->pluginCollection->
all
(
)
,
$shopwareContext
)
->
getEntities
(
)
->
getElements
(
)
;
$dependants
=
$this
->requirementValidator->
resolveActiveDependants
(
$plugin
,
$dependantPlugins
)
;
if
(
\
count
(
$dependants
)
> 0
)
{
throw
new
PluginHasActiveDependantsException
(
$plugin
->
getName
(
)
,
$dependants
)
;
}
$pluginBaseClassString
=
$plugin
->
getBaseClass
(
)
;
$pluginBaseClass
=
$this
->
getPluginInstance
(
$pluginBaseClassString
)
;
$deactivateContext
=
new
DeactivateContext
(
$pluginBaseClass
,
$shopwareContext
,
$this
->shopwareVersion,
$plugin
->
getVersion
(
)
,
$this
->
createMigrationCollection
(
$pluginBaseClass
)
)
;