custom/plugins/MkxBetterVariants/src/MkxBetterVariants.php line 14

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace MkxBetterVariants;
  3. use MkxBetterVariants\Installer\CustomFieldInstaller;
  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 Symfony\Component\DependencyInjection\ContainerBuilder;
  11. class MkxBetterVariants extends Plugin
  12. {
  13.     public function build(ContainerBuilder $container): void
  14.     {
  15.         $container->setParameter('mkx_better_variants.plugin_dir'$this->getPath());
  16.         parent::build($container);
  17.     }
  18.     public function install(InstallContext $context): void
  19.     {
  20.          (new CustomFieldInstaller($this->container))->install($context);
  21.     }
  22.     public function uninstall(UninstallContext $context): void
  23.     {
  24.         (new CustomFieldInstaller($this->container))->uninstall($context);
  25.     }
  26.     public function update(UpdateContext $context): void
  27.     {
  28.         (new CustomFieldInstaller($this->container))->update($context);
  29.     }
  30.     public function activate(ActivateContext $context): void
  31.     {
  32.         (new CustomFieldInstaller($this->container))->activate($context);
  33.     }
  34.     public function deactivate(DeactivateContext $context): void
  35.     {
  36.         (new CustomFieldInstaller($this->container))->deactivate($context);
  37.     }
  38. }