<?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 GbmedCustomFieldsFilter
* @copyright Copyright (c) 2023, gb media
* @license proprietary
* @author Giuseppe Bottino
* @link http://www.gb-media.biz
*/
namespace Gbmed\CustomFieldsFilter;
use Gbmed\CustomFieldsFilter\Installer\Installer;
use Doctrine\DBAL\Connection;
use Exception as DBALException;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class GbmedCustomFieldsFilter extends Plugin
{
/**
* removing the plugin data
*
* @param UninstallContext $context
*
* @throws DBALException
*/
public function uninstall(UninstallContext $context): void
{
$this->getInstaller()->uninstall($context);
parent::uninstall($context);
}
/**
* return Installer instance
*
* @return Installer
*/
private function getInstaller(): Installer
{
return new Installer(
$this->container->get(Connection::class)
);
}
}