@@ -18,7 +18,7 @@ class SaveHandler
18
18
/**
19
19
* @var ProductLinkRepositoryInterface
20
20
*/
21
- protected $ productLinkRepo ;
21
+ protected $ productLinkRepository ;
22
22
23
23
/**
24
24
* @var MetadataPool
@@ -39,18 +39,18 @@ class SaveHandler
39
39
* SaveHandler constructor.
40
40
* @param MetadataPool $metadataPool
41
41
* @param Link $linkResource
42
- * @param ProductLinkRepositoryInterface $productLinkRepo
42
+ * @param ProductLinkRepositoryInterface $productLinkRepository
43
43
* @param \Magento\Catalog\Model\Product\LinkTypeProvider $linkTypeProvider
44
44
*/
45
45
public function __construct (
46
46
MetadataPool $ metadataPool ,
47
47
Link $ linkResource ,
48
- ProductLinkRepositoryInterface $ productLinkRepo ,
48
+ ProductLinkRepositoryInterface $ productLinkRepository ,
49
49
\Magento \Catalog \Model \Product \LinkTypeProvider $ linkTypeProvider
50
50
) {
51
51
$ this ->metadataPool = $ metadataPool ;
52
52
$ this ->linkResource = $ linkResource ;
53
- $ this ->productLinkRepo = $ productLinkRepo ;
53
+ $ this ->productLinkRepository = $ productLinkRepository ;
54
54
$ this ->linkTypeProvider = $ linkTypeProvider ;
55
55
}
56
56
@@ -65,8 +65,8 @@ public function execute($entityType, $entity)
65
65
$ link = $ entity ->getData ($ this ->metadataPool ->getMetadata ($ entityType )->getLinkField ());
66
66
if ($ this ->linkResource ->hasProductLinks ($ link )) {
67
67
/** @var \Magento\Catalog\Api\Data\ProductInterface $entity */
68
- foreach ($ this ->productLinkRepo ->getList ($ entity ) as $ link ) {
69
- $ this ->productLinkRepo ->delete ($ link );
68
+ foreach ($ this ->productLinkRepository ->getList ($ entity ) as $ link ) {
69
+ $ this ->productLinkRepository ->delete ($ link );
70
70
}
71
71
}
72
72
$ productLinks = $ entity ->getProductLinks ();
@@ -94,7 +94,7 @@ public function execute($entityType, $entity)
94
94
95
95
if (count ($ productLinks ) > 0 ) {
96
96
foreach ($ entity ->getProductLinks () as $ link ) {
97
- $ this ->productLinkRepo ->save ($ link );
97
+ $ this ->productLinkRepository ->save ($ link );
98
98
}
99
99
}
100
100
return $ entity ;
0 commit comments