vendor/generationshop/consent-mode/src/GshopConsentMode.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Gshop\ConsentMode;
  3. use Doctrine\DBAL\Connection;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  6. class GshopConsentMode extends Plugin
  7. {
  8.     public function uninstall(UninstallContext $uninstallContext): void
  9.     {
  10.         parent::uninstall($uninstallContext);
  11.         if ($uninstallContext->keepUserData()) {
  12.             return;
  13.         }
  14.         /** @var Connection $connection */
  15.         $connection $this->container->get('Doctrine\DBAL\Connection');
  16.         foreach ($uninstallContext->getMigrationCollection()->getMigrationSteps() as $migrationStep) {
  17.             $migrationStep->updateDestructive($connection);
  18.         }
  19.         $this->removeMigrations();
  20.     }
  21. }