File tree Expand file tree Collapse file tree 1 file changed +21
-8
lines changed
app/code/Magento/ImportExport/Model Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -521,14 +521,8 @@ public function importSource()
521
521
*/
522
522
private function importSourceCallback ()
523
523
{
524
- $ ids = $ this ->_getEntityAdapter ()->getIds ();
525
- if (empty ($ ids )) {
526
- $ idsFromPostData = $ this ->getData (self ::FIELD_IMPORT_IDS );
527
- if (null !== $ idsFromPostData && '' !== $ idsFromPostData ) {
528
- $ ids = explode (", " , $ idsFromPostData );
529
- $ this ->_getEntityAdapter ()->setIds ($ ids );
530
- }
531
- }
524
+ $ ids = $ this ->getImportIds ();
525
+ $ this ->_getEntityAdapter ()->setIds ($ ids );
532
526
$ this ->setData ('entity ' , $ this ->getDataSourceModel ()->getEntityTypeCode ($ ids ));
533
527
$ this ->setData ('behavior ' , $ this ->getDataSourceModel ()->getBehavior ($ ids ));
534
528
@@ -583,6 +577,25 @@ private function importSourceCallback()
583
577
return $ result ;
584
578
}
585
579
580
+ /**
581
+ * Get entity import ids
582
+ *
583
+ * @return array
584
+ * @throws LocalizedException
585
+ */
586
+ private function getImportIds (): array
587
+ {
588
+ $ ids = $ this ->_getEntityAdapter ()->getIds ();
589
+ if (empty ($ ids )) {
590
+ $ idsFromPostData = $ this ->getData (self ::FIELD_IMPORT_IDS );
591
+ if (null !== $ idsFromPostData && '' !== $ idsFromPostData ) {
592
+ $ ids = explode (", " , $ idsFromPostData );
593
+ }
594
+ }
595
+
596
+ return $ ids ;
597
+ }
598
+
586
599
/**
587
600
* Process import.
588
601
*
You can’t perform that action at this time.
0 commit comments