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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Blur\BlurElysiumSlider;
  3. use Blur\BlurElysiumSlider\Bootstrap\Lifecycle;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  6. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  7. class BlurElysiumSlider extends Plugin
  8. {
  9.     public function postInstall(InstallContext $installContext): void
  10.     {
  11.         $lifecycle = new Lifecycle$this->container );
  12.         $lifecycle->install$installContext->getContext() );
  13.     }
  14.     
  15.     public function uninstallUninstallContext $uninstallContext ): void
  16.     {
  17.         $uninstallContext->setAutoMigratefalse ); // disable auto migration execution
  18.         $migrationCollection $uninstallContext->getMigrationCollection(); // get migration collection
  19.         if ( $uninstallContext->keepUserData() === false ) {
  20.             // call updateDestructive and remove entity from database
  21.             $migrationCollection->migrateDestructiveInPlace1624100471 ); 
  22.             // remove media folder and according default folder
  23.             // $this->removeMediaFolders( $uninstallContext->getContext() );
  24.             $lifecycle = new Lifecycle$this->container );
  25.             $lifecycle->uninstall$uninstallContext->getContext() );
  26.         } 
  27.     }
  28. }