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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace GreatSuperMegaSliderSW6;
  3. use GreatSuperMegaSliderSW6\Service\RemoveSliderService;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  6. class GreatSuperMegaSliderSW6 extends Plugin
  7. {
  8.     public function uninstall(UninstallContext $context): void
  9.     {
  10.         if ($context->keepUserData()) {
  11.             return;
  12.         }
  13.         $removeSliderService = new RemoveSliderService(
  14.             $this->container->get('cms_slot.repository'),
  15.             $this->container->get('cms_block.repository'),
  16.             $context->getContext()
  17.         );
  18.         $removeSliderService->remove();
  19.         parent::uninstall($context);
  20.     }
  21. }