custom/plugins/KlarnaPayment/src/KlarnaPayment.php line 21

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace KlarnaPayment;
  4. use KlarnaPayment\Installer\KlarnaInstaller;
  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\UninstallContext;
  10. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  11. use Symfony\Component\DependencyInjection\ContainerInterface;
  12. include_once 'Components/Helper/BackwardsCompatibility/RouteScope.php';
  13. /**
  14.  * @property ContainerInterface $container
  15.  */
  16. class KlarnaPayment extends Plugin
  17. {
  18.     /**
  19.      * {@inheritdoc}
  20.      */
  21.     public function install(InstallContext $installContext): void
  22.     {
  23.         (new KlarnaInstaller($this->container))->install($installContext);
  24.     }
  25.     /**
  26.      * {@inheritdoc}
  27.      */
  28.     public function update(UpdateContext $updateContext): void
  29.     {
  30.         (new KlarnaInstaller($this->container))->update($updateContext);
  31.     }
  32.     /**
  33.      * {@inheritdoc}
  34.      */
  35.     public function activate(ActivateContext $activateContext): void
  36.     {
  37.         (new KlarnaInstaller($this->container))->activate($activateContext);
  38.     }
  39.     /**
  40.      * {@inheritdoc}
  41.      */
  42.     public function deactivate(DeactivateContext $deactivateContext): void
  43.     {
  44.         (new KlarnaInstaller($this->container))->deactivate($deactivateContext);
  45.     }
  46.     /**
  47.      * {@inheritdoc}
  48.      */
  49.     public function uninstall(UninstallContext $uninstallContext): void
  50.     {
  51.         (new KlarnaInstaller($this->container))->uninstall($uninstallContext);
  52.     }
  53. }