<?php declare(strict_types=1);
/**
* gb media
* All Rights Reserved.
*
* Unauthorized copying of this file, via any medium is strictly prohibited.
* The content of this file is proprietary and confidential.
*
* @category Shopware
* @package Shopware_Plugins
* @subpackage GbmedClientPentagastAktionenSlider
* @copyright Copyright (c) 2023, gb media
* @license proprietary
* @author Giuseppe Bottino
* @link http://www.gb-media.biz
*/
namespace Gbmed\ClientPentagastAktionenSlider;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class GbmedClientPentagastAktionenSlider extends Plugin
{
/**
* removing the plugin data
*
* @param UninstallContext $context
*
* @throws DBALException
* @throws \Shopware\Core\Framework\DataAbstractionLayer\Exception\InconsistentCriteriaIdsException
*/
public function uninstall(UninstallContext $context): void
{
if ($context->keepUserData()) {
return;
}
try {
$sql = file_get_contents(__DIR__ . '/Resources/sql/drop.sql');
$this->container->get(Connection::class)->executeStatement($sql);
} catch (\Exception $e) {
}
}
}