<?php declare(strict_types=1);
namespace Swkweb\Infobar;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Swkweb\Infobar\Util\Lifecycle\InstallUninstall;
class SwkwebInfobar extends Plugin
{
public function uninstall(UninstallContext $uninstallContext): void
{
if ($uninstallContext->keepUserData()) {
return;
}
$this->getInstallUninstall()->uninstall($uninstallContext->getContext());
}
private function getInstallUninstall(): InstallUninstall
{
/** @var Connection $connection */
$connection = $this->container->get(Connection::class);
return new InstallUninstall($connection);
}
}