custom/plugins/ApplifactionGuidedShopping/src/ApplifactionGuidedShopping.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace ApplifactionGuidedShopping;
  3. use Doctrine\DBAL\Connection;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  6. class ApplifactionGuidedShopping extends Plugin
  7. {
  8.     public function uninstall(UninstallContext $uninstallContext): void
  9.     {
  10.         parent::uninstall($uninstallContext);
  11.         if ($uninstallContext->keepUserData()) {
  12.             return;
  13.         }
  14.         $this->dropTables();
  15.     }
  16.     private function dropTables(): void
  17.     {
  18.         $connection $this->container->get(Connection::class);
  19.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_property_group_option_value`');
  20.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_dynamic_filter_rule`');
  21.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_accessory_excluded_option`');
  22.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_accessory_included_option`');
  23.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_accessory_product_stream`');
  24.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_main_product_excluded_option`');
  25.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_main_product_included_option`');
  26.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_main_product_stream`');
  27.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule_translation`');
  28.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_accessory_rule`');
  29.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_finder_step_option`');
  30.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_finder_step_stream`');
  31.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_property_group_option_extension_translation`');
  32.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_property_group_option_extension`');
  33.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_stream_extension_translation`');
  34.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_stream_extension`');
  35.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_finder_step_translation`');
  36.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_finder_step`');
  37.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_finder_translation`');
  38.         $connection->executeUpdate('DROP TABLE IF EXISTS `ags_product_finder`');
  39.     }
  40. }