public function uninstallPlugin(Plugin
$plugin,
$removeData = true
) { $bootstrap =
$this->
getPluginBootstrap($plugin);
/** @var Shopware_Components_Plugin_Namespace $namespace */
$namespace =
$bootstrap->
Collection();
try { $result =
$namespace->
uninstallPlugin($bootstrap,
$removeData);
} catch (Exception
$e) { throw new Exception(sprintf("Unable to uninstall '%s', got exception:\n%s\n",
$plugin->
getName(),
$e->
getMessage()), 0,
$e);
} $result = \
is_bool($result) ?
['success' =>
$result] :
$result;
if (!
$result['success'
]) { if (isset($result['message'
])) { throw new Exception(sprintf("Unable to uninstall '%s', got message:\n%s\n",
$plugin->
getName(),
$result['message'
]));
} throw new Exception(sprintf('Unable to uninstall %s, an unknown error occured.',
$plugin->
getName()));
}