<?php declare(strict_types=1);
namespace EconsorPropertySets;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Doctrine\DBAL\Connection;
class EconsorPropertySets extends Plugin
{
public function install(InstallContext $context): void
{
parent::install($context);
}
public function uninstall(UninstallContext $uninstallContext): void
{
if ($uninstallContext->keepUserData()) {
parent::uninstall($uninstallContext);
return;
}
$connection = $this->container->get(Connection::class);
$connection->executeStatement ('DROP TABLE IF EXISTS `econsor_property_sets_property_group`');
$connection->executeStatement ('DROP TABLE IF EXISTS `econsor_property_sets_set_values`');
$connection->executeStatement ('DROP TABLE IF EXISTS `econsor_property_sets`');
}
}