custom/plugins/econsorpropertysets/src/EconsorPropertySets.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace EconsorPropertySets;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  6. use Doctrine\DBAL\Connection;
  7. class EconsorPropertySets extends Plugin
  8. {
  9.     public function install(InstallContext $context): void
  10.     {
  11.         parent::install($context);
  12.     }
  13.     public function uninstall(UninstallContext $uninstallContext): void
  14.     {
  15.         if ($uninstallContext->keepUserData()) {
  16.             parent::uninstall($uninstallContext);
  17.             return;
  18.         }
  19.         $connection $this->container->get(Connection::class);
  20.         $connection->executeStatement ('DROP TABLE IF EXISTS `econsor_property_sets_property_group`');
  21.         $connection->executeStatement ('DROP TABLE IF EXISTS `econsor_property_sets_set_values`');
  22.         $connection->executeStatement ('DROP TABLE IF EXISTS `econsor_property_sets`');
  23.     }
  24. }