<?php
declare(strict_types=1);
namespace Wbfk\Bundles;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class WbfkBundles extends Plugin
{
public function install(InstallContext $installContext): void
{
}
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
if ($uninstallContext->keepUserData()) {
return;
}
/** @var Connection $connection */
$connection = $this->container->get(Connection::class);
try {
$connection->executeStatement('DROP TABLE IF EXISTS `wbfk_bundle_product`');
} catch (Exception $e) {
}
}
}