<?php declare(strict_types=1);
namespace TomRockets;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Shopware\Storefront\Framework\ThemeInterface;
use TomRockets\Service\CustomFieldsetsService;
class TomRockets extends Plugin implements ThemeInterface
{
public function install(InstallContext $installContext): void
{
parent::install($installContext);
(new CustomFieldsetsService(
$this->container->get('custom_field_set.repository'),
Context::createDefaultContext()
))->create();
}
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
(new CustomFieldsetsService(
$this->container->get('custom_field_set.repository'),
$uninstallContext->getContext()
))->remove();
}
}