vendor/store.shopware.com/scopplatformredirecter/src/ScopPlatformRedirecter.php line 27

Open in your IDE?
  1. <?php
  2. /**
  3.  * Implemented by scope01 GmbH team https://scope01.com
  4.  *
  5.  * @copyright scope01 GmbH https://scope01.com
  6.  * @license MIT License
  7.  * @link https://scope01.com
  8.  */
  9. declare(strict_types=1);
  10. /**
  11.  * Implemented by scope01 GmbH team https://scope01.com
  12.  *
  13.  * @copyright scope01 GmbH https://scope01.com
  14.  * @license MIT
  15.  * @link https://scope01.com
  16.  */
  17. namespace Scop\PlatformRedirecter;
  18. use Doctrine\DBAL\Connection;
  19. use Shopware\Core\Framework\Plugin;
  20. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  21. /**
  22.  * Shopware-Plugin ScopPlatformRedirecter
  23.  */
  24. class ScopPlatformRedirecter extends Plugin
  25. {
  26.     /**
  27.      *
  28.      * {@inheritdoc}
  29.      * @see \Shopware\Core\Framework\Plugin::uninstall()
  30.      */
  31.     public function uninstall(UninstallContext $uninstallContext): void
  32.     {
  33.         parent::uninstall($uninstallContext);
  34.         // keep data for plugin
  35.         if ($uninstallContext->keepUserData()) {
  36.             return;
  37.         }
  38.         /**
  39.          *
  40.          * @var Connection $connection
  41.          */
  42.         $connection $this->container->get(Connection::class);
  43.         $sql "DROP TABLE IF EXISTS `scop_platform_redirecter_redirect`;";
  44.         $connection->executeUpdate($sql);
  45.     }
  46. }