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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace ImnxxDisableMagnifier;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  5. use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
  6. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  7. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  8. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  9. class ImnxxDisableMagnifier extends Plugin
  10. {
  11.     public function install(InstallContext $installContext): void
  12.     {
  13.         // Do stuff such as creating a new payment method
  14.     }
  15.     public function uninstall(UninstallContext $uninstallContext): void
  16.     {
  17.         parent::uninstall($uninstallContext);
  18.         if ($uninstallContext->keepUserData()) {
  19.             return;
  20.         }
  21.         // Remove or deactivate the data created by the plugin
  22.     }
  23.     public function activate(ActivateContext $activateContext): void
  24.     {
  25.         // Activate entities, such as a new payment method
  26.         // Or create new entities here, because now your plugin is installed and active for sure
  27.     }
  28.     public function deactivate(DeactivateContext $deactivateContext): void
  29.     {
  30.         // Deactivate entities, such as a new payment method
  31.         // Or remove previously created entities
  32.     }
  33.     public function update(UpdateContext $updateContext): void
  34.     {
  35.         // Update necessary stuff, mostly non-database related
  36.     }
  37.     public function postInstall(InstallContext $installContext): void
  38.     {
  39.     }
  40.     public function postUpdate(UpdateContext $updateContext): void
  41.     {
  42.     }
  43. }