custom/plugins/UltraFooterTunerProModulOne/src/UltraFooterTunerProModulOne.php line 13

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Ultra\Footer\Tuner\Pro\Modul\One;
  3. use Shopware\Core\Framework\Plugin;
  4. use Doctrine\DBAL\Connection;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;   
  6. use Shopware\Core\Framework\Plugin\Context\ActivateContext;  
  7. use Shopware\Core\Framework\Plugin\Context\DeactivateContext
  8. use Shopware\Core\Framework\Plugin\Context\UninstallContext
  9. use Shopware\Core\Framework\Plugin\Context\UpdateContext
  10. class UltraFooterTunerProModulOne extends Plugin
  11. {
  12.     public function install(InstallContext $context): void
  13.     {
  14.     }
  15.     
  16.     public function activate(ActivateContext $context): void
  17.     {
  18.     }
  19.     
  20.     public function update(UpdateContext $context): void
  21.     {
  22.         $connection $this->container->get(Connection::class);
  23.         $connection->executeUpdate('UPDATE system_config SET configuration_key = REPLACE(configuration_key,"ultrafootertunerpromodulone","UltraFooterTunerProModulOne")');
  24.     }
  25.     
  26.     public function deactivate(DeactivateContext $context): void
  27.     {
  28.     }
  29.     
  30.     public function uninstall(UninstallContext $context): void
  31.     {
  32.         parent::uninstall($context);
  33.         if ($context->keepUserData()) {
  34.             return;
  35.         }
  36.         $connection $this->container->get(Connection::class);
  37.         $connection->executeUpdate('delete FROM `system_config` where configuration_key like "UltraFooterTunerProModulOne%"');
  38.     }
  39.    
  40. }