custom/static-plugins/WexoGreenAlternatives/src/WexoGreenAlternatives.php line 13

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