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

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace MadOrderCustomerDatatransfer;
  4. use Shopware\Core\Framework\Plugin;
  5. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  6. use Shopware\Core\Framework\Plugin\Context\UninstallContext;
  7. use MadOrderCustomerDatatransfer\Service\MadCustomFieldService;
  8. class MadOrderCustomerDatatransfer extends Plugin
  9. {
  10.     public function install(InstallContext $installContext): void
  11.     {
  12.         $customFields = new MadCustomFieldService($this->container->get('custom_field_set.repository'));
  13.         $customFields->createFields($installContext);
  14.     }
  15.     public function uninstall(UninstallContext $uninstallContext): void{
  16.         $customFields = new MadCustomFieldService($this->container->get('custom_field_set.repository'));
  17.         $customFields->deleteFields($uninstallContext);
  18.     }
  19. }