custom/plugins/CogiFreeProducts/src/CogiFreeProducts.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Cogi\FreeProducts;
  3. use Shopware\Core\Framework\Plugin;
  4. use Doctrine\DBAL\Connection;
  5. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  6. class CogiFreeProducts extends Plugin
  7. {
  8.     public function uninstall(UninstallContext $context): void
  9.     {
  10.         parent::uninstall($context);
  11.         if ($context->keepUserData()) {
  12.             return;
  13.         }
  14.         $connection $this->container->get(Connection::class);
  15.         $connection->exec('DROP TABLE IF EXISTS `cogi_free_products`');
  16.     }
  17. }