<?php declare(strict_types=1);
namespace WabsNotification;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
class WabsNotification extends Plugin
{
public function install(InstallContext $installContext): void
{
$installContext->setAutoMigrate(true);
/** @var EntityRepositoryInterface $templateTypeRepository */
$templateTypeRepository = $this->container->get('mail_template_type.repository');
$data = [
'id' => md5('discontinuedProducts.notification'),
'technicalName' => 'discontinuedProducts.notification',
'name' => 'Makulierungsbenachrichtigung',
'templateData' => ['products' => 'list']
];
$templateTypeRepository->upsert([$data], $installContext->getContext());
}
}