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

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