18
18
use Magento \Framework \Stdlib \StringUtils ;
19
19
use Magento \Catalog \Model \Category as CategoryModel ;
20
20
use Magento \Catalog \Model \ResourceModel \Category \Attribute \Collection as CategoryAttributeCollection ;
21
- use Magento \Catalog \Model \ResourceModel \Category \Collection as CategoryCollection ;
21
+ use Magento \Catalog \Model \ResourceModel \Category \CollectionFactory as CategoryCollectionFactory ;
22
22
use Magento \Framework \App \Config \ScopeConfigInterface ;
23
23
use Magento \ImportExport \Model \ImportFactory ;
24
24
use Magento \ImportExport \Model \ResourceModel \Helper as ImportExportHelper ;
@@ -259,9 +259,9 @@ class Category extends \Magento\ImportExport\Model\Import\AbstractEntity
259
259
protected $ attributeCollection ;
260
260
261
261
/**
262
- * @var \Magento\Catalog\Model\ResourceModel\Category\Collection
262
+ * @var CategoryCollectionFactory
263
263
*/
264
- protected $ categoryCollection ;
264
+ protected $ categoryCollectionFactory ;
265
265
266
266
/**
267
267
* @var \Magento\ImportExport\Model\ResourceModel\Helper
@@ -327,7 +327,7 @@ class Category extends \Magento\ImportExport\Model\Import\AbstractEntity
327
327
* @param StorageFactory $storageFactory
328
328
* @param CategoryModel $defaultCategory
329
329
* @param CategoryAttributeCollection $attributeCollection
330
- * @param CategoryCollection $categoryCollection
330
+ * @param CategoryCollectionFactory $categoryCollectionFactory
331
331
* @param EavConfig $eavConfig
332
332
* @param ManagerInterface $eventManager
333
333
* @param UploaderFactory $imageUploaderFactory
@@ -349,7 +349,7 @@ public function __construct(
349
349
StorageFactory $ storageFactory ,
350
350
CategoryModel $ defaultCategory ,
351
351
CategoryAttributeCollection $ attributeCollection ,
352
- CategoryCollection $ categoryCollection ,
352
+ CategoryCollectionFactory $ categoryCollectionFactory ,
353
353
EavConfig $ eavConfig ,
354
354
ManagerInterface $ eventManager ,
355
355
UploaderFactory $ imageUploaderFactory ,
@@ -379,7 +379,7 @@ public function __construct(
379
379
$ this ->storageFactory = $ storageFactory ;
380
380
$ this ->defaultCategory = $ defaultCategory ;
381
381
$ this ->attributeCollection = $ attributeCollection ;
382
- $ this ->categoryCollection = $ categoryCollection ;
382
+ $ this ->categoryCollectionFactory = $ categoryCollectionFactory ;
383
383
$ this ->eventManager = $ eventManager ;
384
384
$ this ->uploaderFactory = $ imageUploaderFactory ;
385
385
$ this ->versionFeatures = $ versionFeatures ;
@@ -544,7 +544,7 @@ protected function initCategories()
544
544
*/
545
545
protected function getCollection ()
546
546
{
547
- return $ this ->categoryCollection ->setStoreId (0 )->addNameToResult ();
547
+ return $ this ->categoryCollectionFactory -> create () ->setStoreId (0 )->addNameToResult ();
548
548
}
549
549
550
550
/**
0 commit comments