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

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Uandi\UandiEfbErpSynchronization;
  3. use Shopware\Core\Framework\Plugin;
  4. use Shopware\Core\Framework\Plugin\Context\InstallContext;
  5. use Uandi\UandiEfbErpSynchronization\Service\Stock\CustomFieldService as StockCustomFieldService;
  6. class UandiEfbErpSynchronization extends Plugin
  7. {
  8.     /**
  9.      * @param InstallContext $installContext
  10.      */
  11.     public function install(InstallContext $installContext) : void
  12.     {
  13.         parent::install($installContext);
  14.         $stockCustomFieldService = new StockCustomFieldService(
  15.             $this->container->get('custom_field_set.repository')
  16.         );
  17.         // Add custom fields
  18.         $stockCustomFieldService->addStockCustomFieldsToProduct($installContext->getContext());
  19.     }
  20. }