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

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Divante\Nuvei;
  4. use Divante\Core\Service\InstallerInterface;
  5. use Divante\Nuvei\Lifecycle\InstallerFactory;
  6. use Shopware\Core\Framework\Plugin;
  7. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  8. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  9. class DivanteNuvei extends Plugin
  10. {
  11.     public function install(InstallContext $installContext): void
  12.     {
  13.         $this->getInstaller()->install($installContext);
  14.     }
  15.     public function update(UpdateContext $updateContext): void
  16.     {
  17.         $this->getInstaller()->update($updateContext);
  18.     }
  19.     protected function getInstaller(): InstallerInterface
  20.     {
  21.         $factory = new InstallerFactory($this->container);
  22.         return $factory->create();
  23.     }
  24. }