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

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