<?php declare(strict_types=1);
namespace FuerstenbergPorzellan;
use Shopware\Core\Framework\Plugin;
use Shopware\Storefront\Framework\ThemeInterface;
use Shopware\Core\Framework\Plugin\Context\ActivateContext;
use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use FuerstenbergPorzellan\Installer\CustomFieldsInstaller;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
class FuerstenbergPorzellan extends Plugin implements ThemeInterface
{
public function install(InstallContext $installContext): void
{
(new CustomFieldsInstaller($this->getCustomFieldSetRepo()))->install($installContext);
}
protected function getCustomFieldSetRepo(): EntityRepository
{
return $this->container->get('custom_field_set.repository');
}
public function update(UpdateContext $updateContext): void
{
(new CustomFieldsInstaller($this->getCustomFieldSetRepo()))->update($updateContext);
}
public function uninstall(UninstallContext $uninstallContext): void
{
(new CustomFieldsInstaller($this->getCustomFieldSetRepo()))->uninstall($uninstallContext);
}
public function activate(ActivateContext $activateContext): void
{
(new CustomFieldsInstaller($this->getCustomFieldSetRepo()))->activate($activateContext);
}
public function deactivate(DeactivateContext $deactivateContext): void
{
(new CustomFieldsInstaller($this->getCustomFieldSetRepo()))->deactivate($deactivateContext);
}
}