<?php declare(strict_types=1);
namespace MadArticleBuyTime;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use MadArticleBuyTime\Service\MadCustomFieldService;
class MadArticleBuyTime extends Plugin
{
public const BUYTIME_PRODUCT_EXTENSION_KEY = 'mad_buytime';
public function install(InstallContext $installContext): void
{
$customFields = new MadCustomFieldService($this->container->get('custom_field_set.repository'));
$customFields->createFields($installContext);
}
public function uninstall(UninstallContext $uninstallContext): void{
$customFields = new MadCustomFieldService($this->container->get('custom_field_set.repository'));
$customFields->deleteFields($uninstallContext);
}
}