<?php
declare(strict_types=1);
namespace System4Configurator;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use System4Configurator\Setup\Installer;
use System4Configurator\Setup\Uninstaller;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use System4Configurator\Setup\Updater;
class System4Configurator extends Plugin
{
/**
* @param InstallContext $context
*/
public function install(InstallContext $context): void
{
$installer = new Installer(
$this->container->get(Connection::class),
$this->container
);
$installer->install($context);
}
public function update(UpdateContext $updateContext): void
{
$updater = new Updater(
$this->container->get(Connection::class),
$this->container
);
$updater->update($updateContext);
}
public function uninstall(UninstallContext $context): void
{
parent::uninstall($context);
$unInstaller = new Uninstaller(
$this->container->get(Connection::class),
$this->container
);
$unInstaller->uninstall($context);
}
}