/**
  * @param ChannelRepositoryInterface   $channelRepository
  * @param AttributeRepositoryInterface $attributeRepository
  * @param AttributeRequirementFactory  $factory
  * @param string                       $jobInstanceCode
  */
 public function __construct(ChannelRepositoryInterface $channelRepository, AttributeRepositoryInterface $attributeRepository, AttributeRequirementFactory $factory, $jobInstanceCode)
 {
     parent::__construct($jobInstanceCode);
     $this->channelRepository = $channelRepository;
     $this->attributeRepository = $attributeRepository;
     $this->factory = $factory;
     $this->attRequirements = new ArrayCollection();
 }
 /**
  * @param ProductBuilderInterface      $productBuilder
  * @param UserContext                  $userContext
  * @param AttributeRepositoryInterface $attributeRepository
  * @param ObjectUpdaterInterface       $productUpdater
  * @param ValidatorInterface           $productValidator
  * @param NormalizerInterface          $internalNormalizer
  * @param AttributeConverterInterface   $localizedConverter
  * @param LocalizerRegistryInterface   $localizerRegistry
  * @param CollectionFilterInterface    $productValuesFilter
  * @param string                       $tmpStorageDir
  * @param string                       $jobInstanceCode
  */
 public function __construct(ProductBuilderInterface $productBuilder, UserContext $userContext, AttributeRepositoryInterface $attributeRepository, ObjectUpdaterInterface $productUpdater, ValidatorInterface $productValidator, NormalizerInterface $internalNormalizer, AttributeConverterInterface $localizedConverter, LocalizerRegistryInterface $localizerRegistry, CollectionFilterInterface $productValuesFilter, $tmpStorageDir, $jobInstanceCode)
 {
     parent::__construct($jobInstanceCode);
     $this->productBuilder = $productBuilder;
     $this->userContext = $userContext;
     $this->attributeRepository = $attributeRepository;
     $this->productUpdater = $productUpdater;
     $this->productValidator = $productValidator;
     $this->tmpStorageDir = $tmpStorageDir;
     $this->internalNormalizer = $internalNormalizer;
     $this->localizedConverter = $localizedConverter;
     $this->localizerRegistry = $localizerRegistry;
     $this->productValuesFilter = $productValuesFilter;
     $this->values = '';
 }
 function it_throws_an_exception_if_no_job_instance_is_found($jobInstanceRepo, AbstractMassEditOperation $operation)
 {
     $operation->getJobInstanceCode()->willReturn('mass_colorize');
     $jobInstanceRepo->findOneBy(['code' => 'mass_colorize'])->willReturn(null);
     $this->shouldThrow(new NotFoundResourceException('No JobInstance found with code "mass_colorize"'))->during('launch', [$operation]);
 }
Ejemplo n.º 4
0
 /**
  * @param string $jobInstanceCode
  */
 public function __construct($jobInstanceCode)
 {
     parent::__construct($jobInstanceCode);
     $this->groups = new ArrayCollection();
 }
 /**
  * {@inheritdoc}
  */
 public function getBatchConfig()
 {
     $config = json_decode(stripslashes(parent::getBatchConfig()), true);
     $config['locale'] = $this->userContext->getUiLocale()->getCode();
     return addslashes(json_encode($config));
 }
Ejemplo n.º 6
0
 /**
  * @param string $jobInstanceCode
  * @param string $formType
  */
 public function __construct($jobInstanceCode, $formType)
 {
     parent::__construct($jobInstanceCode);
     $this->formType = $formType;
     $this->categories = [];
 }