custom/plugins/shopware6-sapoci/src/OciPunchout.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Orcamultimedia\OciPunchout;
  4. use Orcamultimedia\OciPunchout\Installment\InstallService;
  5. use Shopware\Core\Framework\Plugin;
  6. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  7. use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
  8. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  9. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  10. class OciPunchout extends Plugin
  11. {
  12.     public function install(InstallContext $installContext): void
  13.     {
  14.         (new InstallService($this->container))->install($installContext->getContext());
  15.     }
  16.     public function activate(ActivateContext $activateContext): void
  17.     {
  18.         (new InstallService($this->container))->activate($activateContext->getContext());
  19.     }
  20.     public function deactivate(DeactivateContext $deactivateContext): void
  21.     {
  22.         (new InstallService($this->container))->deactivate($deactivateContext->getContext());
  23.     }
  24.     public function update(UpdateContext $updateContext): void
  25.     {
  26.         (new InstallService($this->container))->update($updateContext->getContext());
  27.     }
  28.     // We don't want to remove custom fields because they could contain important data
  29. }