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

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