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 5
5
*/
6
6
namespace Magento \BundleImportExport \Model \Import \Product \Type \Bundle ;
7
7
8
+ use Magento \Catalog \Model \ResourceModel \Product \Relation ;
9
+ use Magento \Framework \App \ObjectManager ;
10
+
8
11
/**
9
12
* A bundle product relations (options, selections, etc.) data saver.
10
13
*
@@ -18,20 +21,21 @@ class RelationsDataSaver
18
21
private $ resource ;
19
22
20
23
/**
21
- * @var \Magento\Catalog\Model\ResourceModel\Product\ Relation
24
+ * @var Relation
22
25
*/
23
26
private $ productRelation ;
24
27
25
28
/**
26
29
* @param \Magento\Framework\App\ResourceConnection $resource
27
- * @param \Magento\Catalog\Model\ResourceModel\Product\ Relation $productRelation
30
+ * @param Relation $productRelation
28
31
*/
29
32
public function __construct (
30
33
\Magento \Framework \App \ResourceConnection $ resource ,
31
- \ Magento \ Catalog \ Model \ ResourceModel \ Product \ Relation $ productRelation
34
+ Relation $ productRelation = null
32
35
) {
33
36
$ this ->resource = $ resource ;
34
- $ this ->productRelation = $ productRelation ;
37
+ $ this ->productRelation = $ productRelation
38
+ ?: ObjectManager::getInstance ()->get (Relation::class);
35
39
}
36
40
37
41
/**
You can’t perform that action at this time.
0 commit comments