<?php declare(strict_types=1);
namespace Mailingwor\Mailingwork;
use Mailingwor\Mailingwork\Migration\Migration1552484873Settings;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use Doctrine\DBAL\Connection;
class MailingworMailingwork extends Plugin
{
public function install(InstallContext $installContext): void
{
parent::install($installContext);
}
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
if (!$uninstallContext->keepUserData()) {
$connection = $this->container->get(Connection::class);
$connection->executeUpdate('DROP TABLE IF EXISTS `'.Migration1552484873Settings::TABLE_NAME.'`');
}
}
}