/** * @param \Magento\Framework\Stdlib\StringUtils $string * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\ImportExport\Model\ImportFactory $importFactory * @param \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper * @param \Magento\Framework\App\ResourceConnection $resource * @param ProcessingErrorAggregatorInterface $errorAggregator * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\ImportExport\Model\Export\Factory $collectionFactory * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\StorageFactory $storageFactory * @param \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory $attrCollectionFactory * @param \Magento\Customer\Model\CustomerFactory $customerFactory * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(\Magento\Framework\Stdlib\StringUtils $string, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\ImportExport\Model\ImportFactory $importFactory, \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper, \Magento\Framework\App\ResourceConnection $resource, ProcessingErrorAggregatorInterface $errorAggregator, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\ImportExport\Model\Export\Factory $collectionFactory, \Magento\Eav\Model\Config $eavConfig, \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\StorageFactory $storageFactory, \Magento\Customer\Model\ResourceModel\Attribute\CollectionFactory $attrCollectionFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, array $data = []) { $this->_resourceHelper = $resourceHelper; if (isset($data['attribute_collection'])) { $this->_attributeCollection = $data['attribute_collection']; unset($data['attribute_collection']); } else { $this->_attributeCollection = $attrCollectionFactory->create(); $this->_attributeCollection->addSystemHiddenFilterWithPasswordHash(); $data['attribute_collection'] = $this->_attributeCollection; } parent::__construct($string, $scopeConfig, $importFactory, $resourceHelper, $resource, $errorAggregator, $storeManager, $collectionFactory, $eavConfig, $storageFactory, $data); $this->_specialAttributes[] = self::COLUMN_WEBSITE; $this->_specialAttributes[] = self::COLUMN_STORE; $this->_permanentAttributes[] = self::COLUMN_EMAIL; $this->_permanentAttributes[] = self::COLUMN_WEBSITE; $this->_indexValueAttributes[] = 'group_id'; $this->addMessageTemplate(self::ERROR_DUPLICATE_EMAIL_SITE, __('This email is found more than once in the import file.')); $this->addMessageTemplate(self::ERROR_ROW_IS_ORPHAN, __('Orphan rows that will be skipped due default row errors')); $this->addMessageTemplate(self::ERROR_INVALID_STORE, __('Invalid value in Store column (store does not exists?)')); $this->addMessageTemplate(self::ERROR_EMAIL_SITE_NOT_FOUND, __('We can\'t find that email and website combination.')); $this->addMessageTemplate(self::ERROR_PASSWORD_LENGTH, __('Please enter a password with a valid length.')); $this->_initStores(true)->_initAttributes(); $this->_customerModel = $customerFactory->create(); /** @var $customerResource \Magento\Customer\Model\ResourceModel\Customer */ $customerResource = $this->_customerModel->getResource(); $this->_entityTable = $customerResource->getEntityTable(); }