Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Address.php
Go to the documentation of this file.
1 <?php
7 
15 
24 {
28  const ATTRIBUTE_COLLECTION_NAME = \Magento\Customer\Model\ResourceModel\Address\Attribute\Collection::class;
29 
38  const COLUMN_EMAIL = '_email';
39 
40  const COLUMN_ADDRESS_ID = '_entity_id';
41 
47  const COLUMN_REGION = 'region';
48 
49  const COLUMN_COUNTRY_ID = 'country_id';
50 
51  const COLUMN_POSTCODE = 'postcode';
52 
58  const COLUMN_DEFAULT_BILLING = '_address_default_billing_';
59 
60  const COLUMN_DEFAULT_SHIPPING = '_address_default_shipping_';
61 
67  const ERROR_ADDRESS_ID_IS_EMPTY = 'addressIdIsEmpty';
68 
69  const ERROR_ADDRESS_NOT_FOUND = 'addressNotFound';
70 
71  const ERROR_INVALID_REGION = 'invalidRegion';
72 
73  const ERROR_DUPLICATE_PK = 'duplicateAddressId';
74 
78  protected static $_defaultAddressAttributeMapping = [
79  self::COLUMN_DEFAULT_BILLING => 'default_billing',
80  self::COLUMN_DEFAULT_SHIPPING => 'default_shipping',
81  ];
82 
89 
96 
102  protected $_entityTable;
103 
120  protected $_countryRegions = [];
121 
127  protected $_regions = [];
128 
134  protected $_specialAttributes = [
141  ];
142 
148  protected $_customerEntity;
149 
155  protected $_nextEntityId;
156 
163 
170 
176  protected $_importedRowPks = [];
177 
181  protected $_resourceHelper;
182 
186  protected $_customerFactory;
187 
191  protected $_eavConfig;
192 
196  protected $_addressFactory;
197 
201  protected $dateTime;
202 
208  protected $_customerAttributes = [];
209 
215  protected $validColumnNames = [
216  "region_id", "vat_is_valid", "vat_request_date", "vat_request_id", "vat_request_success"
217  ];
218 
223 
227  private $countryWithWebsites;
228 
234  private $optionsByWebsite = [];
235 
239  private $addressStorage;
240 
265  public function __construct(
266  \Magento\Framework\Stdlib\StringUtils $string,
267  \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
268  \Magento\ImportExport\Model\ImportFactory $importFactory,
269  \Magento\ImportExport\Model\ResourceModel\Helper $resourceHelper,
272  \Magento\Store\Model\StoreManagerInterface $storeManager,
273  \Magento\ImportExport\Model\Export\Factory $collectionFactory,
274  \Magento\Eav\Model\Config $eavConfig,
275  \Magento\CustomerImportExport\Model\ResourceModel\Import\Customer\StorageFactory $storageFactory,
276  \Magento\Customer\Model\AddressFactory $addressFactory,
277  \Magento\Directory\Model\ResourceModel\Region\CollectionFactory $regionColFactory,
278  \Magento\Customer\Model\CustomerFactory $customerFactory,
279  \Magento\Customer\Model\ResourceModel\Address\Attribute\CollectionFactory $attributesFactory,
280  \Magento\Framework\Stdlib\DateTime $dateTime,
282  array $data = [],
283  CountryWithWebsitesSource $countryWithWebsites = null,
284  AddressStorage $addressStorage = null
285  ) {
286  $this->_customerFactory = $customerFactory;
287  $this->_addressFactory = $addressFactory;
288  $this->_eavConfig = $eavConfig;
289  $this->_resourceHelper = $resourceHelper;
290  $this->dateTime = $dateTime;
291  $this->postcodeValidator = $postcodeValidator;
292  $this->countryWithWebsites = $countryWithWebsites ?:
293  ObjectManager::getInstance()->get(CountryWithWebsitesSource::class);
294 
295  if (!isset($data['attribute_collection'])) {
297  $attributeCollection = $attributesFactory->create();
298  $attributeCollection->addSystemHiddenFilter()->addExcludeHiddenFrontendFilter();
299  $data['attribute_collection'] = $attributeCollection;
300  }
301  parent::__construct(
302  $string,
303  $scopeConfig,
304  $importFactory,
305  $resourceHelper,
306  $resource,
309  $collectionFactory,
310  $eavConfig,
311  $storageFactory,
312  $data
313  );
314 
315  $this->_entityTable = isset(
316  $data['entity_table']
317  ) ? $data['entity_table'] : $addressFactory->create()->getResource()->getEntityTable();
318  $this->_regionCollection = isset(
319  $data['region_collection']
320  ) ? $data['region_collection'] : $regionColFactory->create();
321 
322  $this->addMessageTemplate(self::ERROR_ADDRESS_ID_IS_EMPTY, __('Customer address id column is not specified'));
323  $this->addMessageTemplate(
324  self::ERROR_ADDRESS_NOT_FOUND,
325  __('We can\'t find that customer address.')
326  );
327  $this->addMessageTemplate(self::ERROR_INVALID_REGION, __('Please enter a valid region.'));
328  $this->addMessageTemplate(
329  self::ERROR_DUPLICATE_PK,
330  __('We found another row with this email, website and address ID combination.')
331  );
332  $this->addressStorage = $addressStorage
333  ?: ObjectManager::getInstance()->get(AddressStorage::class);
334 
335  $this->_initAttributes();
336  $this->_initCountryRegions();
337  }
338 
342  public function getAttributeOptions(AbstractAttribute $attribute, array $indexAttributes = [])
343  {
344  $standardOptions = parent::getAttributeOptions($attribute, $indexAttributes);
345 
346  if ($attribute->getAttributeCode() === 'country_id') {
347  //If we want to get available options for country field then we have to use alternative source
348  // to get actual data for each website.
349  $options = $this->countryWithWebsites->getAllOptions();
350  //Available country options now will be sorted by websites.
351  $code = $attribute->getAttributeCode();
352  $websiteOptions = [Store::DEFAULT_STORE_ID => $standardOptions];
353  //Sorting options by website.
354  foreach ($options as $option) {
355  if (array_key_exists('website_ids', $option)) {
356  foreach ($option['website_ids'] as $websiteId) {
357  if (!array_key_exists($websiteId, $websiteOptions)) {
358  $websiteOptions[$websiteId] = [];
359  }
360  $optionId = mb_strtolower($option['value']);
361  $websiteOptions[$websiteId][$optionId] = $option['value'];
362  }
363  }
364  }
365  //Storing sorted
366  $this->optionsByWebsite[$code] = $websiteOptions;
367  }
368 
369  return $standardOptions;
370  }
371 
382  private function adjustAttributeDataForWebsite(array $attributeData, int $websiteId): array
383  {
384  if ($attributeData['code'] === 'country_id') {
385  $attributeOptions = $this->optionsByWebsite[$attributeData['code']];
386  if (array_key_exists($websiteId, $attributeOptions)) {
387  $attributeData['options'] = $attributeOptions[$websiteId];
388  }
389  }
390 
391  return $attributeData;
392  }
393 
399  protected function _getCustomerEntity()
400  {
401  if (!$this->_customerEntity) {
402  $this->_customerEntity = $this->_customerFactory->create();
403  }
404  return $this->_customerEntity;
405  }
406 
412  protected function _getNextEntityId()
413  {
414  if (!$this->_nextEntityId) {
416  $addressResource = $this->_addressFactory->create()->getResource();
417  $addressTable = $addressResource->getEntityTable();
418  $this->_nextEntityId = $this->_resourceHelper->getNextAutoincrement($addressTable);
419  }
420  return $this->_nextEntityId++;
421  }
422 
428  protected function _initCountryRegions()
429  {
431  foreach ($this->_regionCollection as $region) {
432  $countryNormalized = strtolower($region->getCountryId());
433  $regionCode = strtolower($region->getCode());
434  $regionName = strtolower($region->getDefaultName());
435  $this->_countryRegions[$countryNormalized][$regionCode] = $region->getId();
436  $this->_countryRegions[$countryNormalized][$regionName] = $region->getId();
437  $this->_regions[$region->getId()] = $region->getDefaultName();
438  }
439  return $this;
440  }
441 
452  public function prepareCustomerData($rows): void
453  {
454  $customersPresent = [];
455  foreach ($rows as $rowData) {
456  $email = $rowData[static::COLUMN_EMAIL] ?? null;
457  $websiteId = isset($rowData[static::COLUMN_WEBSITE])
458  ? $this->getWebsiteId($rowData[static::COLUMN_WEBSITE]) : false;
459  if ($email && $websiteId !== false) {
460  $customersPresent[] = [
461  'email' => $email,
462  'website_id' => $websiteId,
463  ];
464  }
465  }
466  $this->getCustomerStorage()->prepareCustomers($customersPresent);
467 
468  $ids = [];
469  foreach ($customersPresent as $customerData) {
470  $id = $this->getCustomerStorage()->getCustomerId(
471  $customerData['email'],
472  $customerData['website_id']
473  );
474  if ($id) {
475  $ids[] = $id;
476  }
477  }
478 
479  $this->addressStorage->prepareAddresses($ids);
480  }
481 
485  public function validateData()
486  {
487  $this->prepareCustomerData($this->getSource());
488 
489  return parent::validateData();
490  }
491 
499  protected function _importData()
500  {
501  //Preparing data for mass validation/import.
502  $rows = [];
503  while ($bunch = $this->_dataSourceModel->getNextBunch()) {
504  $rows = array_merge($rows, $bunch);
505  }
506  $this->prepareCustomerData($rows);
507  unset($bunch, $rows);
508  $this->_dataSourceModel->getIterator()->rewind();
509 
510  //Importing
511  while ($bunch = $this->_dataSourceModel->getNextBunch()) {
512  $newRows = [];
513  $updateRows = [];
514  $attributes = [];
515  $defaults = [];
516  // customer default addresses (billing/shipping) data
517  $deleteRowIds = [];
518 
519  foreach ($bunch as $rowNumber => $rowData) {
520  // check row data
521  if ($this->_isOptionalAddressEmpty($rowData) || !$this->validateRow($rowData, $rowNumber)) {
522  continue;
523  }
524  if ($this->getErrorAggregator()->hasToBeTerminated()) {
525  $this->getErrorAggregator()->addRowToSkip($rowNumber);
526  continue;
527  }
528 
529  if ($this->getBehavior($rowData) == \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE) {
530  $addUpdateResult = $this->_prepareDataForUpdate($rowData);
531  if ($addUpdateResult['entity_row_new']) {
532  $newRows[] = $addUpdateResult['entity_row_new'];
533  }
534  if ($addUpdateResult['entity_row_update']) {
535  $updateRows[] = $addUpdateResult['entity_row_update'];
536  }
537  $attributes = $this->_mergeEntityAttributes($addUpdateResult['attributes'], $attributes);
538  $defaults = $this->_mergeEntityAttributes($addUpdateResult['defaults'], $defaults);
539  } elseif ($this->getBehavior($rowData) == \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE) {
540  $deleteRowIds[] = $rowData[self::COLUMN_ADDRESS_ID];
541  }
542  }
543  $this->updateItemsCounterStats($newRows, $updateRows, $deleteRowIds);
544 
545  $this->_saveAddressEntities($newRows, $updateRows)
546  ->_saveAddressAttributes($attributes)
547  ->_saveCustomerDefaults($defaults);
548 
549  $this->_deleteAddressEntities($deleteRowIds);
550  }
551  return true;
552  }
553 
561  protected function _mergeEntityAttributes(array $newAttributes, array $attributes)
562  {
563  foreach ($newAttributes as $tableName => $tableData) {
564  foreach ($tableData as $entityId => $entityData) {
565  foreach ($entityData as $attributeId => $attributeValue) {
566  $attributes[$tableName][$entityId][$attributeId] = $attributeValue;
567  }
568  }
569  }
570  return $attributes;
571  }
572 
581  protected function _prepareDataForUpdate(array $rowData):array
582  {
583  $multiSeparator = $this->getMultipleValueSeparator();
584  $email = strtolower($rowData[self::COLUMN_EMAIL]);
585  $customerId = $this->_getCustomerId($email, $rowData[self::COLUMN_WEBSITE]);
586  // entity table data
587  $entityRowNew = [];
588  $entityRowUpdate = [];
589  // attribute values
590  $attributes = [];
591  // customer default addresses
592  $defaults = [];
593  $newAddress = true;
594  // get address id
595  if ($rowData[self::COLUMN_ADDRESS_ID]
596  && $this->addressStorage->doesExist(
597  $rowData[self::COLUMN_ADDRESS_ID],
598  (string)$customerId
599  )
600  ) {
601  $newAddress = false;
602  $addressId = $rowData[self::COLUMN_ADDRESS_ID];
603  } else {
604  $addressId = $this->_getNextEntityId();
605  }
606  $entityRow = [
607  'entity_id' => $addressId,
608  'parent_id' => $customerId,
609  'updated_at' => (new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT),
610  ];
611  $websiteId = $this->_websiteCodeToId[$rowData[self::COLUMN_WEBSITE]];
612 
613  foreach ($this->_attributes as $attributeAlias => $attributeParams) {
614  if (array_key_exists($attributeAlias, $rowData)) {
615  $attributeParams = $this->adjustAttributeDataForWebsite($attributeParams, $websiteId);
616 
617  if (!strlen($rowData[$attributeAlias])) {
618  if ($newAddress) {
619  $value = null;
620  } else {
621  continue;
622  }
623  } elseif ($newAddress && !strlen($rowData[$attributeAlias])) {
624  } elseif (in_array($attributeParams['type'], ['select', 'boolean'])) {
625  $value = $this->getSelectAttrIdByValue($attributeParams, mb_strtolower($rowData[$attributeAlias]));
626  } elseif ('datetime' == $attributeParams['type']) {
627  $value = (new \DateTime())->setTimestamp(strtotime($rowData[$attributeAlias]));
628  $value = $value->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT);
629  } elseif ('multiselect' == $attributeParams['type']) {
630  $ids = [];
631  foreach (explode($multiSeparator, mb_strtolower($rowData[$attributeAlias])) as $subValue) {
632  $ids[] = $this->getSelectAttrIdByValue($attributeParams, $subValue);
633  }
634  $value = implode(',', $ids);
635  } else {
636  $value = $rowData[$attributeAlias];
637  }
638  if ($attributeParams['is_static']) {
639  $entityRow[$attributeAlias] = $value;
640  } else {
641  $attributes[$attributeParams['table']][$addressId][$attributeParams['id']]= $value;
642  }
643  }
644  }
645  foreach (self::getDefaultAddressAttributeMapping() as $columnName => $attributeCode) {
646  if (!empty($rowData[$columnName])) {
648  $table = $this->_getCustomerEntity()->getResource()->getTable('customer_entity');
649  $defaults[$table][$customerId][$attributeCode] = $addressId;
650  }
651  }
652  // let's try to find region ID
653  $entityRow['region_id'] = null;
654  if (!empty($rowData[self::COLUMN_REGION])) {
655  $countryNormalized = strtolower($rowData[self::COLUMN_COUNTRY_ID]);
656  $regionNormalized = strtolower($rowData[self::COLUMN_REGION]);
657 
658  if (isset($this->_countryRegions[$countryNormalized][$regionNormalized])) {
659  $regionId = $this->_countryRegions[$countryNormalized][$regionNormalized];
660  $entityRow[self::COLUMN_REGION] = $this->_regions[$regionId];
661  $entityRow['region_id'] = $regionId;
662  }
663  }
664  if ($newAddress) {
665  $entityRowNew = $entityRow;
666  $entityRowNew['created_at'] =
667  (new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT);
668  } else {
669  $entityRowUpdate = $entityRow;
670  }
671 
672  return [
673  'entity_row_new' => $entityRowNew,
674  'entity_row_update' => $entityRowUpdate,
675  'attributes' => $attributes,
676  'defaults' => $defaults
677  ];
678  }
679 
687  protected function _saveAddressEntities(array $addRows, array $updateRows)
688  {
689  if ($addRows) {
690  $this->_connection->insertMultiple($this->_entityTable, $addRows);
691  }
692  if ($updateRows) {
693  //list of updated fields can be different for addresses. We can not use insertOnDuplicate for whole rows.
694  foreach ($updateRows as $row) {
695  $fields = array_diff(array_keys($row), ['entity_id', 'parent_id', 'created_at']);
696  $this->_connection->insertOnDuplicate($this->_entityTable, $row, $fields);
697  }
698  }
699  return $this;
700  }
701 
708  protected function _saveAddressAttributes(array $attributesData)
709  {
710  foreach ($attributesData as $tableName => $data) {
711  $tableData = [];
712  foreach ($data as $addressId => $attributeData) {
713  foreach ($attributeData as $attributeId => $value) {
714  $tableData[] = [
715  'entity_id' => $addressId,
716  'attribute_id' => $attributeId,
717  'value' => $value,
718  ];
719  }
720  }
721  $this->_connection->insertOnDuplicate($tableName, $tableData, ['value']);
722  }
723  return $this;
724  }
725 
733  protected function _saveCustomerDefaults(array $defaults)
734  {
735  foreach ($defaults as $tableName => $data) {
736  foreach ($data as $customerId => $defaultsData) {
737  $data = array_merge(
738  ['entity_id' => $customerId],
739  $defaultsData
740  );
741  $this->_connection->insertOnDuplicate($tableName, $data, array_keys($defaultsData));
742  }
743  }
744  return $this;
745  }
746 
753  protected function _deleteAddressEntities(array $entityRowIds)
754  {
755  if ($entityRowIds) {
756  $this->_connection->delete($this->_entityTable, ['entity_id IN (?)' => $entityRowIds]);
757  }
758  return $this;
759  }
760 
767  public function getEntityTypeCode()
768  {
769  return 'customer_address';
770  }
771 
778  public static function getDefaultAddressAttributeMapping()
779  {
781  }
782 
789  protected function _isOptionalAddressEmpty(array $rowData)
790  {
791  if (empty($this->_customerAttributes)) {
792  return false;
793  }
794  unset(
795  $rowData[Customer::COLUMN_WEBSITE],
796  $rowData[Customer::COLUMN_STORE],
797  $rowData['_email']
798  );
799 
800  foreach ($rowData as $key => $value) {
801  if (!in_array($key, $this->_customerAttributes) && !empty($value)) {
802  return false;
803  }
804  }
805 
806  return true;
807  }
808 
818  protected function _validateRowForUpdate(array $rowData, $rowNumber)
819  {
820  $multiSeparator = $this->getMultipleValueSeparator();
821  if ($this->_checkUniqueKey($rowData, $rowNumber)) {
822  $email = strtolower($rowData[self::COLUMN_EMAIL]);
823  $website = $rowData[self::COLUMN_WEBSITE];
824  $addressId = $rowData[self::COLUMN_ADDRESS_ID];
826 
827  if ($customerId === false) {
828  $this->addRowError(self::ERROR_CUSTOMER_NOT_FOUND, $rowNumber);
829  } else {
830  if ($this->_checkRowDuplicate($customerId, $addressId)) {
831  $this->addRowError(self::ERROR_DUPLICATE_PK, $rowNumber);
832  } else {
833  // check simple attributes
834  foreach ($this->_attributes as $attributeCode => $attributeParams) {
835  $websiteId = $this->_websiteCodeToId[$website];
836  $attributeParams = $this->adjustAttributeDataForWebsite($attributeParams, $websiteId);
837 
838  if (in_array($attributeCode, $this->_ignoredAttributes)) {
839  continue;
840  }
841  if (isset($rowData[$attributeCode]) && strlen($rowData[$attributeCode])) {
842  $this->isAttributeValid(
843  $attributeCode,
844  $attributeParams,
845  $rowData,
846  $rowNumber,
847  $multiSeparator
848  );
849  } elseif ($attributeParams['is_required']
850  && !$this->addressStorage->doesExist(
851  (string)$addressId,
852  (string)$customerId
853  )
854  ) {
855  $this->addRowError(self::ERROR_VALUE_IS_REQUIRED, $rowNumber, $attributeCode);
856  }
857  }
858 
859  if (isset($rowData[self::COLUMN_POSTCODE])
860  && isset($rowData[self::COLUMN_COUNTRY_ID])
861  && !$this->postcodeValidator->isValid(
862  $rowData[self::COLUMN_COUNTRY_ID],
863  $rowData[self::COLUMN_POSTCODE]
864  )
865  ) {
866  $this->addRowError(self::ERROR_VALUE_IS_REQUIRED, $rowNumber, self::COLUMN_POSTCODE);
867  }
868 
869  if (isset($rowData[self::COLUMN_COUNTRY_ID]) && isset($rowData[self::COLUMN_REGION])) {
870  $countryRegions = isset(
871  $this->_countryRegions[strtolower($rowData[self::COLUMN_COUNTRY_ID])]
872  ) ? $this->_countryRegions[strtolower(
873  $rowData[self::COLUMN_COUNTRY_ID]
874  )] : [];
875 
876  if (!empty($rowData[self::COLUMN_REGION]) && !empty($countryRegions) && !isset(
877  $countryRegions[strtolower($rowData[self::COLUMN_REGION])]
878  )
879  ) {
880  $this->addRowError(self::ERROR_INVALID_REGION, $rowNumber, self::COLUMN_REGION);
881  }
882  }
883  }
884  }
885  }
886  }
887 
895  protected function _validateRowForDelete(array $rowData, $rowNumber)
896  {
897  if ($this->_checkUniqueKey($rowData, $rowNumber)) {
898  $email = strtolower($rowData[self::COLUMN_EMAIL]);
899  $website = $rowData[self::COLUMN_WEBSITE];
900  $addressId = $rowData[self::COLUMN_ADDRESS_ID];
901 
903  if ($customerId === false) {
904  $this->addRowError(self::ERROR_CUSTOMER_NOT_FOUND, $rowNumber);
905  } else {
906  if (!strlen($addressId)) {
907  $this->addRowError(self::ERROR_ADDRESS_ID_IS_EMPTY, $rowNumber);
908  } elseif (!$this->addressStorage->doesExist(
909  (string)$addressId,
910  (string)$customerId
911  )) {
912  $this->addRowError(self::ERROR_ADDRESS_NOT_FOUND, $rowNumber);
913  }
914  }
915  }
916  }
917 
925  protected function _checkRowDuplicate($customerId, $addressId)
926  {
927  if ($this->addressStorage->doesExist(
928  (string)$addressId,
929  (string)$customerId
930  )) {
931  if (!isset($this->_importedRowPks[$customerId][$addressId])) {
932  $this->_importedRowPks[$customerId][$addressId] = true;
933  return false;
934  } else {
935  return true;
936  }
937  } else {
938  return false;
939  }
940  }
941 
948  public function setCustomerAttributes($customerAttributes)
949  {
950  $this->_customerAttributes = $customerAttributes;
951  return $this;
952  }
953 }
_validateRowForDelete(array $rowData, $rowNumber)
Definition: Address.php:895
$customerData
$tableName
Definition: trigger.php:13
isAttributeValid( $attributeCode, array $attributeParams, array $rowData, $rowNumber, $multiSeparator=Import::DEFAULT_GLOBAL_MULTI_VALUE_SEPARATOR)
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$email
Definition: details.phtml:13
$id
Definition: fieldset.phtml:14
addRowError( $errorCode, $errorRowNum, $colName=null, $errorMessage=null, $errorLevel=ProcessingError::ERROR_LEVEL_CRITICAL, $errorDescription=null)
$fields
Definition: details.phtml:14
$storeManager
__()
Definition: __.php:13
$resource
Definition: bulk.php:12
_saveAddressEntities(array $addRows, array $updateRows)
Definition: Address.php:687
_validateRowForUpdate(array $rowData, $rowNumber)
Definition: Address.php:818
$attributesData
$addressFactory
Definition: quote.php:20
$value
Definition: gender.phtml:16
$attributeCode
Definition: extend.phtml:12
$attributes
Definition: matrix.phtml:13
getAttributeOptions(AbstractAttribute $attribute, array $indexAttributes=[])
Definition: Address.php:342
getSelectAttrIdByValue(array $attributeParameters, $value)
_mergeEntityAttributes(array $newAttributes, array $attributes)
Definition: Address.php:561
updateItemsCounterStats(array $created=[], array $updated=[], array $deleted=[])
$table
Definition: trigger.php:14
__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, array $data=[])
$code
Definition: info.phtml:12