custom/plugins/BDLCustomThemeChanges/src/BDLCustomThemeChanges.php line 15

Open in your IDE?
  1. <?php declare (strict_types 1);
  2. /**
  3.  * (c) by BDL Media
  4.  */
  5. namespace BDL\CustomThemeChanges;
  6. use Doctrine\DBAL\Connection;
  7. use Shopware\Core\Framework\Plugin;
  8. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  9. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  10. use BDL\CustomThemeChanges\Setup\Installer;
  11. use BDL\CustomThemeChanges\Setup\Uninstaller;
  12. class BDLCustomThemeChanges extends Plugin
  13. {
  14.     /**
  15.      * @param InstallContext $context
  16.      */
  17.     public function install(InstallContext $context): void
  18.     {
  19.         $installer = new Installer(
  20.             $this->container->get(Connection::class),
  21.             $this->container,
  22.             $this->container->get('custom_field.repository')
  23.         );
  24.         $installer->install();
  25.     }
  26.     public function uninstall(UninstallContext $context): void
  27.     {
  28.         $unInstaller = new Uninstaller(
  29.             $this->container->get(Connection::class),
  30.             $this->container,
  31.             $this->container->get('custom_field_set.repository')
  32.         );
  33.         $unInstaller->uninstall($context);
  34.     }
  35. }