custom/plugins/ValkarchFormBotBlocker/src/ValkarchFormBotBlocker.php line 9

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Valkarch\FormBotBlocker;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  5. use Valkarch\FormBotBlocker\Installer\FormBotBlockerInstaller;
  6. class ValkarchFormBotBlocker extends Plugin
  7. {
  8.     public const PLUGIN_NAME 'ValkarchFormBotBlocker';
  9.     public function uninstall(UninstallContext $uninstallContext): void
  10.     {
  11.         parent::uninstall($uninstallContext);
  12.         if ($uninstallContext->keepUserData()) {
  13.             return;
  14.         }
  15.         $formBotBlockerInstaller = new FormBotBlockerInstaller($this->container);
  16.         $formBotBlockerInstaller->uninstall();
  17.     }
  18.     /**
  19.      * Render templates before third-party plugins
  20.      *
  21.      * @return int
  22.      */
  23.     public function getTemplatePriority(): int
  24.     {
  25.         return 5;
  26.     }
  27. }