Example #1
0
 /**
  * @param \Magento\Framework\Json\Helper\Data $jsonHelper
  * @param \Magento\ImportExport\Helper\Data $importExportData
  * @param \Magento\ImportExport\Model\ResourceModel\Import\Data $importData
  * @param \Magento\Eav\Model\Config $config
  * @param \Magento\Framework\App\ResourceConnection $resource
  * @param \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper
  * @param \Magento\Framework\Stdlib\StringUtils $string
  * @param ProcessingErrorAggregatorInterface $errorAggregator
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry
  * @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
  * @param \Magento\CatalogInventory\Model\Spi\StockStateProviderInterface $stockStateProvider
  * @param \Magento\Catalog\Helper\Data $catalogData
  * @param \Magento\ImportExport\Model\Import\Config $importConfig
  * @param Proxy\Product\ResourceFactory $resourceFactory
  * @param Product\OptionFactory $optionFactory
  * @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $setColFactory
  * @param Product\Type\Factory $productTypeFactory
  * @param \Magento\Catalog\Model\ResourceModel\Product\LinkFactory $linkFactory
  * @param Proxy\ProductFactory $proxyProdFactory
  * @param UploaderFactory $uploaderFactory
  * @param \Magento\Framework\Filesystem $filesystem
  * @param \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory $stockResItemFac
  * @param DateTime\TimezoneInterface $localeDate
  * @param DateTime $dateTime
  * @param \Psr\Log\LoggerInterface $logger
  * @param \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry
  * @param Product\StoreResolver $storeResolver
  * @param Product\SkuProcessor $skuProcessor
  * @param Product\CategoryProcessor $categoryProcessor
  * @param Product\Validator $validator
  * @param ObjectRelationProcessor $objectRelationProcessor
  * @param TransactionManagerInterface $transactionManager
  * @param Product\TaxClassProcessor $taxClassProcessor
  * @param array $data
  * @throws \Magento\Framework\Exception\LocalizedException
  *
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\Json\Helper\Data $jsonHelper, \Magento\ImportExport\Helper\Data $importExportData, \Magento\ImportExport\Model\ResourceModel\Import\Data $importData, \Magento\Eav\Model\Config $config, \Magento\Framework\App\ResourceConnection $resource, \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper, \Magento\Framework\Stdlib\StringUtils $string, ProcessingErrorAggregatorInterface $errorAggregator, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry, \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration, \Magento\CatalogInventory\Model\Spi\StockStateProviderInterface $stockStateProvider, \Magento\Catalog\Helper\Data $catalogData, \Magento\ImportExport\Model\Import\Config $importConfig, \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceModelFactory $resourceFactory, \Magento\CatalogImportExport\Model\Import\Product\OptionFactory $optionFactory, \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $setColFactory, \Magento\CatalogImportExport\Model\Import\Product\Type\Factory $productTypeFactory, \Magento\Catalog\Model\ResourceModel\Product\LinkFactory $linkFactory, \Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory, \Magento\CatalogImportExport\Model\Import\UploaderFactory $uploaderFactory, \Magento\Framework\Filesystem $filesystem, \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory $stockResItemFac, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, DateTime $dateTime, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry, Product\StoreResolver $storeResolver, Product\SkuProcessor $skuProcessor, Product\CategoryProcessor $categoryProcessor, Product\Validator $validator, ObjectRelationProcessor $objectRelationProcessor, TransactionManagerInterface $transactionManager, Product\TaxClassProcessor $taxClassProcessor, array $data = [])
 {
     $this->_eventManager = $eventManager;
     $this->stockRegistry = $stockRegistry;
     $this->stockConfiguration = $stockConfiguration;
     $this->stockStateProvider = $stockStateProvider;
     $this->_catalogData = $catalogData;
     $this->_importConfig = $importConfig;
     $this->_resourceFactory = $resourceFactory;
     $this->_setColFactory = $setColFactory;
     $this->_productTypeFactory = $productTypeFactory;
     $this->_linkFactory = $linkFactory;
     $this->_proxyProdFactory = $proxyProdFactory;
     $this->_uploaderFactory = $uploaderFactory;
     $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
     $this->_stockResItemFac = $stockResItemFac;
     $this->_localeDate = $localeDate;
     $this->dateTime = $dateTime;
     $this->indexerRegistry = $indexerRegistry;
     $this->_logger = $logger;
     $this->storeResolver = $storeResolver;
     $this->skuProcessor = $skuProcessor;
     $this->categoryProcessor = $categoryProcessor;
     $this->validator = $validator;
     $this->objectRelationProcessor = $objectRelationProcessor;
     $this->transactionManager = $transactionManager;
     $this->taxClassProcessor = $taxClassProcessor;
     parent::__construct($jsonHelper, $importExportData, $importData, $config, $resource, $resourceHelper, $string, $errorAggregator);
     $this->_optionEntity = isset($data['option_entity']) ? $data['option_entity'] : $optionFactory->create(['data' => ['product_entity' => $this]]);
     $this->_initAttributeSets()->_initTypeModels()->_initSkus();
     $this->validator->init($this);
 }
Example #2
0
 /**
  * @param \Magento\Core\Helper\Data $coreData
  * @param \Magento\ImportExport\Helper\Data $importExportData
  * @param \Magento\ImportExport\Model\Resource\Import\Data $importData
  * @param \Magento\Eav\Model\Config $config
  * @param \Magento\Framework\App\Resource $resource
  * @param \Magento\ImportExport\Model\Resource\Helper $resourceHelper
  * @param \Magento\Framework\Stdlib\String $string
  * @param \Magento\Framework\Event\ManagerInterface $eventManager
  * @param \Magento\CatalogInventory\Service\V1\StockItemService $stockItemService
  * @param \Magento\Catalog\Helper\Data $catalogData
  * @param \Magento\ImportExport\Model\Import\Config $importConfig
  * @param \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceFactory $resourceFactory
  * @param \Magento\CatalogImportExport\Model\Import\Product\OptionFactory $optionFactory
  * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory
  * @param \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryColFactory
  * @param \Magento\Customer\Service\V1\CustomerGroupServiceInterface $customerGroupService
  * @param \Magento\Catalog\Model\ProductFactory $productFactory
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\CatalogImportExport\Model\Import\Product\Type\Factory $productTypeFactory
  * @param \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory
  * @param \Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory
  * @param \Magento\CatalogImportExport\Model\Import\UploaderFactory $uploaderFactory
  * @param \Magento\Framework\App\Filesystem $filesystem
  * @param \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac
  * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
  * @param \Magento\Framework\Stdlib\DateTime $dateTime
  * @param \Magento\Framework\Logger $logger
  * @param \Magento\Indexer\Model\Indexer $newIndexer
  * @param array $data
  */
 public function __construct(\Magento\Core\Helper\Data $coreData, \Magento\ImportExport\Helper\Data $importExportData, \Magento\ImportExport\Model\Resource\Import\Data $importData, \Magento\Eav\Model\Config $config, \Magento\Framework\App\Resource $resource, \Magento\ImportExport\Model\Resource\Helper $resourceHelper, \Magento\Framework\Stdlib\String $string, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\CatalogInventory\Service\V1\StockItemService $stockItemService, \Magento\Catalog\Helper\Data $catalogData, \Magento\ImportExport\Model\Import\Config $importConfig, \Magento\CatalogImportExport\Model\Import\Proxy\Product\ResourceFactory $resourceFactory, \Magento\CatalogImportExport\Model\Import\Product\OptionFactory $optionFactory, \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $setColFactory, \Magento\Catalog\Model\Resource\Category\CollectionFactory $categoryColFactory, \Magento\Customer\Service\V1\CustomerGroupServiceInterface $customerGroupService, \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\CatalogImportExport\Model\Import\Product\Type\Factory $productTypeFactory, \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory, \Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory, \Magento\CatalogImportExport\Model\Import\UploaderFactory $uploaderFactory, \Magento\Framework\App\Filesystem $filesystem, \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Logger $logger, \Magento\Indexer\Model\Indexer $newIndexer, array $data = array())
 {
     $this->_eventManager = $eventManager;
     $this->stockItemService = $stockItemService;
     $this->_catalogData = $catalogData;
     $this->_importConfig = $importConfig;
     $this->_resourceFactory = $resourceFactory;
     $this->_setColFactory = $setColFactory;
     $this->_categoryColFactory = $categoryColFactory;
     $this->_customerGroupService = $customerGroupService;
     $this->_productFactory = $productFactory;
     $this->_storeManager = $storeManager;
     $this->_productTypeFactory = $productTypeFactory;
     $this->_linkFactory = $linkFactory;
     $this->_proxyProdFactory = $proxyProdFactory;
     $this->_uploaderFactory = $uploaderFactory;
     $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
     $this->_stockResItemFac = $stockResItemFac;
     $this->_localeDate = $localeDate;
     $this->dateTime = $dateTime;
     $this->newIndexer = $newIndexer;
     $this->_logger = $logger;
     parent::__construct($coreData, $importExportData, $importData, $config, $resource, $resourceHelper, $string);
     $this->_optionEntity = isset($data['option_entity']) ? $data['option_entity'] : $optionFactory->create(array('data' => array('product_entity' => $this)));
     $this->_initWebsites()->_initStores()->_initAttributeSets()->_initTypeModels()->_initCategories()->_initSkus()->_initCustomerGroups();
 }