<?php declare(strict_types=1);
namespace ComanConsentManager;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class ComanConsentManager extends Plugin
{
public function uninstall(UninstallContext $context): void
{
if ($context->keepUserData()) {
return;
}
/** @var Connection $connection */
$connection = $this->container->get(Connection::class);
$connection->executeQuery('DELETE FROM `system_config` WHERE configuration_key IN (:configKeys)', ['configKeys' => [
'ConsentManager.config.active',
'ConsentManager.config.formId',
'ConsentManager.config.blockingMode',
]], ['configKeys' => Connection::PARAM_STR_ARRAY]);
}
}