custom/plugins/BioraumBenefits/src/BioraumBenefits.php line 13

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Bioraum\Benefits;
  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\Framework\Plugin\Context\UpdateContext;
  9. use Bioraum\Benefits\Installer\CustomFieldInstaller;
  10. class BioraumBenefits extends Plugin
  11. {
  12.     public function install(InstallContext $installContext): void
  13.     {
  14.         (new CustomFieldInstaller($this->container))->install($installContext);
  15.     }
  16.     public function update(UpdateContext $updateContext): void
  17.     {
  18.         (new CustomFieldInstaller($this->container))->update($updateContext);
  19.     }
  20.     public function activate(ActivateContext $activateContext): void
  21.     {
  22.         (new CustomFieldInstaller($this->container))->activate($activateContext);
  23.     }
  24.     public function deactivate(DeactivateContext $deactivateContext): void
  25.     {
  26.         (new CustomFieldInstaller($this->container))->deactivate($deactivateContext);
  27.     }
  28.     public function uninstall(UninstallContext $uninstallContext): void
  29.     {
  30.         (new CustomFieldInstaller($this->container))->uninstall($uninstallContext);
  31.         if ($uninstallContext->keepUserData()) {
  32.             parent::uninstall($uninstallContext);
  33.             return;
  34.         }
  35.     }
  36. }