custom/plugins/WeedesignNoIndex/src/WeedesignNoIndex.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Weedesign\NoIndex;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Context;
  5. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  6. use Shopware\Core\System\SystemConfig\SystemConfigService;
  7. class WeedesignNoIndex extends Plugin
  8. {
  9.     public function update(UpdateContext $context): void
  10.     {
  11.         $systemConfigService $this->container->get(SystemConfigService::class);
  12.         if(empty($systemConfigService->get('WeedesignNoIndex.config.email'))) {
  13.             $systemConfigService->set('WeedesignNoIndex.config.email','support@weedesign.de');
  14.         }
  15.         if(empty($systemConfigService->get('WeedesignNoIndex.config.active'))) {
  16.             $systemConfigService->set('WeedesignNoIndex.config.active','1');
  17.         }
  18.     }
  19. }