custom/plugins/wosoNavitCustomFunctions/src/wosoNavitCustomFunctions.php line 16

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace woso\navitCustomFunctions;
  3. use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\ActivateContext;
  6. use Shopware\Core\Framework\Plugin\Context\DeactivateContext;
  7. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  8. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  9. use Shopware\Core\Framework\Plugin\Context\UpdateContext;
  10. use Shopware\Core\Framework\Plugin\Util\PluginIdProvider;
  11. use Shopware\Core\System\SystemConfig\SystemConfigService;
  12. use woso\navitCustomFunctions\Utils\ActivateDeactivate;
  13. use Symfony\Component\Config\FileLocator;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
  16. class wosoNavitCustomFunctions extends Plugin
  17. {
  18.     /**
  19.      * @var ActivateDeactivate
  20.      */
  21.     private $activateDeactivate;
  22.     /**
  23.      * @Required
  24.      */
  25.     public function setActivateDeactivate(ActivateDeactivate $activateDeactivate): void
  26.     {
  27.         $this->activateDeactivate $activateDeactivate;
  28.     }
  29.     public function activate(ActivateContext $activateContext): void
  30.     {
  31.         $this->activateDeactivate->activate($activateContext->getContext());
  32.         parent::activate($activateContext);
  33.     }
  34.     public function deactivate(DeactivateContext $deactivateContext): void
  35.     {
  36.         $this->activateDeactivate->deactivate($deactivateContext->getContext());
  37.         parent::deactivate($deactivateContext);
  38.     }
  39. }