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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace NetzpEvents6;
  3. use NetzpEvents6\Components\Installer;
  4. use NetzpEvents6\Components\Uninstaller;
  5. use Shopware\Core\Framework\Plugin;
  6. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  7. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  8. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  9. class NetzpEvents6 extends Plugin
  10. {
  11.     public function install(InstallContext $context): void
  12.     {
  13.         parent::install($context);
  14.         (new Installer($this->container))->install();
  15.     }
  16.     public function update(UpdateContext $context): void
  17.     {
  18.         parent::update($context);
  19.         (new Installer($this->container))->update();
  20.     }
  21.     public function uninstall(UninstallContext $context): void
  22.     {
  23.         parent::uninstall($context);
  24.         $this->removeMigrations();
  25.         (new Uninstaller($this->container))->uninstall($context);
  26.     }
  27. }