<?php declare(strict_types=1);
namespace Mcs\ExportAccounting;
use Mcs\ExportAccounting\Service\StatisticsProductGroupService;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\ActivateContext;
use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class McsExportAccounting extends Plugin
{
public function activate(ActivateContext $context): void
{
parent::activate($context);
// Register custom fields
$customFieldService = new StatisticsProductGroupService($this->container);
$customFieldService->addCustomFields($context->getContext());
}
public function deactivate(DeactivateContext $context): void
{
parent::deactivate($context);
// Unregister custom fields
$customFieldService = new StatisticsProductGroupService($this->container);
$customFieldService->removeCustomFields($context->getContext());
}
}