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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace HemoLauter;
  3. use HemoLauter\bootstrap\CustomField;
  4. use HemoLauter\bootstrap\Installer;
  5. use Shopware\Core\Framework\Plugin;
  6. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  7. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  8. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  9. class HemoLauterRegistry extends Plugin
  10. {
  11.     public const PLUGIN_NAME __CLASS__;
  12. //    public function install()
  13. //    {
  14. //        $this->container->set('pluginName', __CLASS__);
  15. //    }
  16.     public function install(InstallContext $context): void
  17.     {
  18.         $this->getInstaller()->install($context);
  19.     }
  20.     public function update(UpdateContext $context): void
  21.     {
  22.         $this->getInstaller()->update($context);
  23.     }
  24.     public function uninstall(UninstallContext $context): void
  25.     {
  26.         $this->getInstaller()->uninstall($context);
  27.     }
  28.     private function getInstaller(): Installer
  29.     {
  30.         return new Installer(new CustomField($this->container));
  31.     }
  32. }