File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 55 */
66namespace Magento \BundleImportExport \Model \Import \Product \Type \Bundle ;
77
8+ use Magento \Catalog \Model \ResourceModel \Product \Relation ;
9+ use Magento \Framework \App \ObjectManager ;
10+
811/**
912 * A bundle product relations (options, selections, etc.) data saver.
1013 *
@@ -18,20 +21,21 @@ class RelationsDataSaver
1821 private $ resource ;
1922
2023 /**
21- * @var \Magento\Catalog\Model\ResourceModel\Product\ Relation
24+ * @var Relation
2225 */
2326 private $ productRelation ;
2427
2528 /**
2629 * @param \Magento\Framework\App\ResourceConnection $resource
27- * @param \Magento\Catalog\Model\ResourceModel\Product\ Relation $productRelation
30+ * @param Relation $productRelation
2831 */
2932 public function __construct (
3033 \Magento \Framework \App \ResourceConnection $ resource ,
31- \ Magento \ Catalog \ Model \ ResourceModel \ Product \ Relation $ productRelation
34+ Relation $ productRelation = null
3235 ) {
3336 $ this ->resource = $ resource ;
34- $ this ->productRelation = $ productRelation ;
37+ $ this ->productRelation = $ productRelation
38+ ?: ObjectManager::getInstance ()->get (Relation::class);
3539 }
3640
3741 /**
You can’t perform that action at this time.
0 commit comments