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()
521521 */
522522 private function importSourceCallback ()
523523 {
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 );
532526 $ this ->setData ('entity ' , $ this ->getDataSourceModel ()->getEntityTypeCode ($ ids ));
533527 $ this ->setData ('behavior ' , $ this ->getDataSourceModel ()->getBehavior ($ ids ));
534528
@@ -583,6 +577,25 @@ private function importSourceCallback()
583577 return $ result ;
584578 }
585579
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+
586599 /**
587600 * Process import.
588601 *
You can’t perform that action at this time.
0 commit comments