custom/plugins/WebarbeitMegaMenuSW6/src/WebarbeitMegaMenuSW6.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Webarbeit\MegaMenuSW6;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  5. use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
  6. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  7. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  8. use Shopware\Core\System\SystemConfig\SystemConfigService;
  9. class WebarbeitMegaMenuSW6 extends Plugin
  10. {
  11.     public function install(InstallContext $context): void
  12.     {
  13.     }
  14.     /**
  15.      * @param string $configName
  16.      * @param null $default
  17.      */
  18.     public function setValue(string $configName$default null): void
  19.     {
  20.         $systemConfigService $this->container->get(SystemConfigService::class);
  21.         $domain $this->getName() . '.config.';
  22.         if ($systemConfigService->get($domain $configName) === null) {
  23.             $systemConfigService->set($domain $configName$default);
  24.         }
  25.     }
  26.     public function activate(ActivateContext $context): void
  27.     {
  28.     }
  29.     public function deactivate(DeactivateContext $context): void
  30.     {
  31.     }
  32.     public function uninstall(UninstallContext $context): void
  33.     {
  34.         parent::uninstall($context);
  35.         if ($context->keepUserData()) {
  36.             return;
  37.         }
  38.     }
  39. }