custom/plugins/MailingworMailingwork/src/MailingworMailingwork.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Mailingwor\Mailingwork;
  3. use Mailingwor\Mailingwork\Migration\Migration1552484873Settings;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  6. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  7. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  8. use Doctrine\DBAL\Connection;
  9. class MailingworMailingwork extends Plugin
  10. {
  11.     public function install(InstallContext $installContext): void
  12.     {
  13.         parent::install($installContext);
  14.     }
  15.     public function uninstall(UninstallContext $uninstallContext): void
  16.     {
  17.         parent::uninstall($uninstallContext);
  18.         if (!$uninstallContext->keepUserData()) {
  19.             $connection $this->container->get(Connection::class);
  20.             $connection->executeUpdate('DROP TABLE IF EXISTS `'.Migration1552484873Settings::TABLE_NAME.'`');
  21.         }
  22.     }
  23. }