You are a developer and looking for Shopware projects?
Apply Now!
PluginNotInstalledException example
/** * @throws PluginNotInstalledException */
public
function
uninstallPlugin
(
PluginEntity
$plugin
,
Context
$shopwareContext
,
bool
$keepUserData
= false
)
: UninstallContext
{
if
(
$plugin
->
getInstalledAt
(
)
=== null
)
{
throw
new
PluginNotInstalledException
(
$plugin
->
getName
(
)
)
;
}
if
(
$plugin
->
getActive
(
)
)
{
$this
->
deactivatePlugin
(
$plugin
,
$shopwareContext
)
;
}
$pluginBaseClassString
=
$plugin
->
getBaseClass
(
)
;
$pluginBaseClass
=
$this
->
getPluginBaseClass
(
$pluginBaseClassString
)
;
$uninstallContext
=
new
UninstallContext
(
$pluginBaseClass
,