custom/plugins/MoorlFoundation/src/MoorlFoundation.php line 11

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace MoorlFoundation;
  3. use MoorlFoundation\Core\PluginFoundation;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  6. use Doctrine\DBAL\Connection;
  7. use Shopware\Core\Framework\DataAbstractionLayer\DefinitionInstanceRegistry;
  8. class MoorlFoundation extends Plugin
  9. {
  10.     public const FEED_URL = [
  11.         'https://demo-shop.moorleiche.com',
  12.         'http://dev.rh-webdesign.com'
  13.     ];
  14.     public function uninstall(UninstallContext $uninstallContext): void
  15.     {
  16.         parent::uninstall($uninstallContext); // TODO: Change the autogenerated stub
  17.         if ($uninstallContext->keepUserData()) {
  18.             return;
  19.         }
  20.         /* @var $foundation PluginFoundation */
  21.         $foundation = new PluginFoundation(
  22.             $this->container->get(DefinitionInstanceRegistry::class),
  23.             $this->container->get(Connection::class)
  24.         );
  25.         $foundation->setContext($uninstallContext->getContext());
  26.         $foundation->dropTables([
  27.             'moorl_foundation_article'
  28.         ]);
  29.     }
  30. }