<?php declare(strict_types=1);
namespace Weedesign\NoIndex;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use Shopware\Core\System\SystemConfig\SystemConfigService;
class WeedesignNoIndex extends Plugin
{
public function update(UpdateContext $context): void
{
$systemConfigService = $this->container->get(SystemConfigService::class);
if(empty($systemConfigService->get('WeedesignNoIndex.config.email'))) {
$systemConfigService->set('WeedesignNoIndex.config.email','support@weedesign.de');
}
if(empty($systemConfigService->get('WeedesignNoIndex.config.active'))) {
$systemConfigService->set('WeedesignNoIndex.config.active','1');
}
}
}