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

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Rapidmail\Shopware;
  4. use Doctrine\DBAL\Connection;
  5. use Rapidmail\Shopware\Repositories\IntegrationRepository;
  6. use Shopware\Core\Framework\Plugin;
  7. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  8. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  9. class rapi1Connector extends Plugin
  10. {
  11.     public function activate(ActivateContext $activateContext): void
  12.     {
  13.     }
  14.     public function uninstall(UninstallContext $context): void
  15.     {
  16.         parent::uninstall($context);
  17.         if (method_exists($context'keepUserData') && $context->keepUserData()) {
  18.             return;
  19.         }
  20.         $connection $this->container->get(Connection::class);
  21.         $connection->executeUpdate(
  22.             'DELETE FROM `integration` WHERE label like "' IntegrationRepository::LABEL '%"'
  23.         );
  24.         $connection->executeUpdate('DROP TABLE IF EXISTS `deleted_entity`');
  25.     }
  26. }