<?php declare(strict_types=1);
/**
* @copyright Copyright (c) 2020, Net Inventors GmbH
* @category Shopware
* @author drebrov
*/
namespace NetInventors\NetiNextAccessManager;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use NetInventors\NetiNextAccessManager\Components\Setup;
/**
* Class NetiNextAccessManager
*
* @package NetInventors\NetiNextAccessManager
*/
class NetiNextAccessManager extends Plugin
{
/**
* @param InstallContext $installContext
*
* @throws \Exception
*/
public function install(InstallContext $installContext): void
{
parent::install($installContext);
(new Setup($installContext, $this->container))->install();
}
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
if ($uninstallContext->keepUserData()) {
return;
}
(new Setup($uninstallContext, $this->container))->uninstall();
}
}