custom/plugins/NetiNextAccessManager/src/NetiNextAccessManager.php line 20

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. /**
  3.  * @copyright  Copyright (c) 2020, Net Inventors GmbH
  4.  * @category   Shopware
  5.  * @author     drebrov
  6.  */
  7. namespace NetInventors\NetiNextAccessManager;
  8. use Shopware\Core\Framework\Plugin;
  9. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  10. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  11. use NetInventors\NetiNextAccessManager\Components\Setup;
  12. /**
  13.  * Class NetiNextAccessManager
  14.  *
  15.  * @package NetInventors\NetiNextAccessManager
  16.  */
  17. class NetiNextAccessManager extends Plugin
  18. {
  19.     /**
  20.      * @param InstallContext $installContext
  21.      *
  22.      * @throws \Exception
  23.      */
  24.     public function install(InstallContext $installContext): void
  25.     {
  26.         parent::install($installContext);
  27.         (new Setup($installContext$this->container))->install();
  28.     }
  29.     public function uninstall(UninstallContext $uninstallContext): void
  30.     {
  31.         parent::uninstall($uninstallContext);
  32.         if ($uninstallContext->keepUserData()) {
  33.             return;
  34.         }
  35.         (new Setup($uninstallContext$this->container))->uninstall();
  36.     }
  37. }