@@ -54,6 +54,11 @@ class LinkManagement implements \Magento\Bundle\Api\ProductLinkManagementInterfa
54
54
*/
55
55
private $ metadataPool ;
56
56
57
+ /**
58
+ * @var \Magento\Store\Model\StoreManagerInterface
59
+ */
60
+ private $ storeManager ;
61
+
57
62
/**
58
63
* @param ProductRepositoryInterface $productRepository
59
64
* @param \Magento\Bundle\Api\Data\LinkInterfaceFactory $linkFactory
@@ -82,7 +87,7 @@ public function __construct(
82
87
}
83
88
84
89
/**
85
- * { @inheritdoc}
90
+ * @inheritdoc
86
91
*/
87
92
public function getChildren ($ productSku , $ optionId = null )
88
93
{
@@ -105,7 +110,7 @@ public function getChildren($productSku, $optionId = null)
105
110
}
106
111
107
112
/**
108
- * { @inheritdoc}
113
+ * @inheritdoc
109
114
*/
110
115
public function addChildByProductSku ($ sku , $ optionId , \Magento \Bundle \Api \Data \LinkInterface $ linkedProduct )
111
116
{
@@ -115,7 +120,8 @@ public function addChildByProductSku($sku, $optionId, \Magento\Bundle\Api\Data\L
115
120
}
116
121
117
122
/**
118
- * {@inheritdoc}
123
+ * @inheritdoc
124
+ *
119
125
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
120
126
* @SuppressWarnings(PHPMD.NPathComplexity)
121
127
*/
@@ -169,6 +175,8 @@ public function saveChild(
169
175
}
170
176
171
177
/**
178
+ * Map data from the product link object to the new selection model
179
+ *
172
180
* @param \Magento\Bundle\Model\Selection $selectionModel
173
181
* @param \Magento\Bundle\Api\Data\LinkInterface $productLink
174
182
* @param string $linkedProductId
@@ -217,7 +225,8 @@ protected function mapProductLinkToSelectionModel(
217
225
}
218
226
219
227
/**
220
- * {@inheritdoc}
228
+ * @inheritdoc
229
+ *
221
230
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
222
231
*/
223
232
public function addChild (
@@ -297,7 +306,7 @@ public function addChild(
297
306
}
298
307
299
308
/**
300
- * { @inheritdoc}
309
+ * @inheritdoc
301
310
*/
302
311
public function removeChild ($ sku , $ optionId , $ childSku )
303
312
{
@@ -336,6 +345,8 @@ public function removeChild($sku, $optionId, $childSku)
336
345
}
337
346
338
347
/**
348
+ * Build new Link object from the product and selection
349
+ *
339
350
* @param \Magento\Catalog\Model\Product $selection
340
351
* @param \Magento\Catalog\Model\Product $product
341
352
* @return \Magento\Bundle\Api\Data\LinkInterface
@@ -367,6 +378,8 @@ private function buildLink(\Magento\Catalog\Model\Product $selection, \Magento\C
367
378
}
368
379
369
380
/**
381
+ * Retrieve bundle options with selections
382
+ *
370
383
* @param \Magento\Catalog\Api\Data\ProductInterface $product
371
384
* @return \Magento\Bundle\Api\Data\OptionInterface[]
372
385
*/
@@ -392,6 +405,7 @@ private function getOptions(\Magento\Catalog\Api\Data\ProductInterface $product)
392
405
393
406
/**
394
407
* Get MetadataPool instance
408
+ *
395
409
* @return MetadataPool
396
410
*/
397
411
private function getMetadataPool ()
0 commit comments