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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace ComanConsentManager;
  3. use Doctrine\DBAL\Connection;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  6. class ComanConsentManager extends Plugin
  7. {
  8.     public function uninstall(UninstallContext $context): void
  9.     {
  10.         if ($context->keepUserData()) {
  11.             return;
  12.         }
  13.         /** @var Connection $connection */
  14.         $connection $this->container->get(Connection::class);
  15.         $connection->executeQuery('DELETE FROM `system_config` WHERE configuration_key IN (:configKeys)', ['configKeys' => [
  16.             'ConsentManager.config.active',
  17.             'ConsentManager.config.formId',
  18.             'ConsentManager.config.blockingMode',
  19.         ]], ['configKeys' => Connection::PARAM_STR_ARRAY]);
  20.     }
  21. }