custom/plugins/SwpProductOptionsSix/src/SwpProductOptionsSix.php line 24

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. /**
  3.  * Shopware
  4.  * Copyright © 2021
  5.  *
  6.  * @category   Shopware
  7.  * @package    SwpProductOptionsSix
  8.  * @subpackage SwpProductOptionsSix.php
  9.  *
  10.  * @copyright  2021 Iguana-Labs GmbH
  11.  * @author     Module Factory <info at module-factory.com>
  12.  * @license    https://www.module-factory.com/eula
  13.  */
  14. namespace Swp\ProductOptionsSix;
  15. use Shopware\Core\Framework\Plugin;
  16. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  17. use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
  18. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  19. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  20. use Swp\ProductOptionsSix\Utils\InstallUninstall;
  21. class SwpProductOptionsSix extends Plugin
  22. {
  23.     /**
  24.      * @param InstallContext $installContext
  25.      * @return void
  26.      */
  27.     public function install(InstallContext $installContext): void
  28.     {
  29.         parent::install($installContext);
  30.     }
  31.     /**
  32.      * @param UninstallContext $uninstallContext
  33.      * @return void
  34.      */
  35.     public function uninstall(UninstallContext $uninstallContext): void
  36.     {
  37.         parent::uninstall($uninstallContext);
  38.         if ($uninstallContext->keepUserData()) {
  39.             return;
  40.         }
  41.         (new InstallUninstall($this->container))->uninstall($uninstallContext->getContext());
  42.     }
  43.     /**
  44.      * @param ActivateContext $activateContext
  45.      * @return void
  46.      */
  47.     public function activate(ActivateContext $activateContext): void
  48.     {
  49.         parent::activate($activateContext);
  50.     }
  51.     /**
  52.      * @param DeactivateContext $deactivateContext
  53.      * @return void
  54.      */
  55.     public function deactivate(DeactivateContext $deactivateContext): void
  56.     {
  57.         parent::deactivate($deactivateContext);
  58.     }
  59. }