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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Ultra\Styler;
  3. use Doctrine\DBAL\Connection;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  6. use Shopware\Core\Framework\Plugin\Context\UpdateContext
  7. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  8. use Shopware\Core\System\SystemConfig\SystemConfigService;
  9. class UltraStyler extends Plugin {    
  10. public function install(InstallContext $context): void    {        
  11.     }    
  12. public function update(UpdateContext $context): void    {        
  13.     }    
  14.     
  15. public function uninstall(UninstallContext $context): void    {        
  16.     parent::uninstall($context);        
  17.     if ($context->keepUserData()) {            
  18.         return;        
  19.     }    
  20.     $connection $this->container->get(Connection::class);
  21.     $connection->executeUpdate('delete FROM system_config where configuration_key like "%UltraStyler.config%"');
  22.     }
  23. }