/** * @param JobParameters $parameters * * @return array */ protected function getConverterOptions(JobParameters $parameters) { $options = []; if ($parameters->has('decimalSeparator')) { $options['decimal_separator'] = $parameters->get('decimalSeparator'); } if ($parameters->has('dateFormat')) { $options['date_format'] = $parameters->get('dateFormat'); } if ($parameters->has('ui_locale')) { $options['locale'] = $parameters->get('ui_locale'); } return $options; }
/** * @param JobParameters $parameters * * @throws \InvalidArgumentException * * @return array */ protected function getNormalizerContext(JobParameters $parameters) { if (!$parameters->has('scope')) { throw new \InvalidArgumentException('No channel found'); } $normalizerContext = ['channels' => [$parameters->get('scope')], 'locales' => $this->getLocaleCodes($parameters->get('scope')), 'filter_types' => ['pim.transform.product_value.structured', 'pim.transform.product_value.structured.quick_export']]; return $normalizerContext; }