File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
app/code/Magento/ImportExport/Model Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -480,14 +480,8 @@ public function getWorkingDir()
480
480
*/
481
481
public function importSource ()
482
482
{
483
- $ ids = $ this ->_getEntityAdapter ()->getIds ();
484
- if (empty ($ ids )) {
485
- $ idsFromPostData = $ this ->getData (self ::FIELD_IMPORT_IDS );
486
- if (null !== $ idsFromPostData && '' !== $ idsFromPostData ) {
487
- $ ids = explode (", " , $ idsFromPostData );
488
- $ this ->_getEntityAdapter ()->setIds ($ ids );
489
- }
490
- }
483
+ $ ids = $ this ->getImportIds ();
484
+ $ this ->_getEntityAdapter ()->setIds ($ ids );
491
485
$ this ->setData ('entity ' , $ this ->getDataSourceModel ()->getEntityTypeCode ($ ids ));
492
486
$ this ->setData ('behavior ' , $ this ->getDataSourceModel ()->getBehavior ($ ids ));
493
487
@@ -540,6 +534,20 @@ public function importSource()
540
534
return $ result ;
541
535
}
542
536
537
+ private function getImportIds (): array
538
+ {
539
+ $ ids = $ this ->_getEntityAdapter ()->getIds ();
540
+ if (empty ($ ids )) {
541
+ $ idsFromPostData = $ this ->getData (self ::FIELD_IMPORT_IDS );
542
+ if (null !== $ idsFromPostData && '' !== $ idsFromPostData ) {
543
+ $ ids = explode (", " , $ idsFromPostData );
544
+ $ this ->_getEntityAdapter ()->setIds ($ ids );
545
+ }
546
+ }
547
+
548
+ return $ ids ;
549
+ }
550
+
543
551
/**
544
552
* Process import.
545
553
*
You can’t perform that action at this time.
0 commit comments