Skip to content

Commit 0a3352c

Browse files
committed
MAGETWO-94670: Product Export fails
1 parent a885eac commit 0a3352c

File tree

1 file changed

+17
-10
lines changed
  • app/code/Magento/CatalogImportExport/Model/Export

1 file changed

+17
-10
lines changed

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
352352
* @param \Magento\Framework\App\ResourceConnection $resource
353353
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
354354
* @param \Psr\Log\LoggerInterface $logger
355-
* @param \Magento\Catalog\Model\ResourceModel\Product\Collection $collection
355+
* @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $collectionFactory
356356
* @param \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig
357357
* @param \Magento\Catalog\Model\ResourceModel\ProductFactory $productFactory
358358
* @param \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory $attrSetColFactory
@@ -361,9 +361,10 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
361361
* @param \Magento\Catalog\Model\ResourceModel\Product\Option\CollectionFactory $optionColFactory
362362
* @param \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $attributeColFactory
363363
* @param Product\Type\Factory $_typeFactory
364-
* @param \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider
365-
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
364+
* @param ProductEntity\LinkTypeProvider $linkTypeProvider
365+
* @param RowCustomizerInterface $rowCustomizer
366366
* @param array $dateAttrCodes
367+
* @throws \Magento\Framework\Exception\LocalizedException
367368
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
368369
*/
369370
public function __construct(
@@ -692,6 +693,8 @@ protected function updateDataWithCategoryColumns(&$dataRow, &$rowCategories, $pr
692693
}
693694

694695
/**
696+
* Get header columns
697+
*
695698
* {@inheritdoc}
696699
*/
697700
public function _getHeaderColumns()
@@ -751,6 +754,8 @@ protected function _getExportMainAttrCodes()
751754
}
752755

753756
/**
757+
* Get entity collection
758+
*
754759
* {@inheritdoc}
755760
*/
756761
protected function _getEntityCollection($resetCollection = false)
@@ -821,9 +826,8 @@ protected function paginateCollection($page, $pageSize)
821826
}
822827

823828
/**
824-
* Export process
825-
*
826829
* @return string
830+
* @throws \Magento\Framework\Exception\LocalizedException
827831
*/
828832
public function export()
829833
{
@@ -857,7 +861,11 @@ public function export()
857861
}
858862

859863
/**
860-
* {@inheritdoc}
864+
* Apply filter to collection and add not skipped attributes to select.
865+
*
866+
* @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $collection
867+
* @return \Magento\Eav\Model\Entity\Collection\AbstractCollection
868+
*
861869
* @since 100.2.0
862870
*/
863871
protected function _prepareEntityCollection(\Magento\Eav\Model\Entity\Collection\AbstractCollection $collection)
@@ -919,11 +927,10 @@ protected function getExportData()
919927
}
920928

921929
/**
922-
* Load products' data from the collection
923-
* and filter it (if needed).
930+
* Load products' data from the collection and filter it (if needed).
924931
*
925-
* @return array Keys are product IDs, values arrays with keys as store IDs
926-
* and values as store-specific versions of Product entity.
932+
* @return array Keys are product IDs, values arrays with keys as store ID
933+
* and values as store-specific versions of Product entity.
927934
*/
928935
protected function loadCollection(): array
929936
{

0 commit comments

Comments
 (0)