@@ -80,15 +80,10 @@ abstract protected function getLinkType(): int;
80
80
* @param \Magento\Catalog\Api\Data\ProductInterface[] $products
81
81
* @param string[] $loadAttributes
82
82
* @param int $linkType
83
- * @param ContextInterface $context
84
83
* @return \Magento\Catalog\Api\Data\ProductInterface[][]
85
84
*/
86
- private function findRelations (
87
- array $ products ,
88
- array $ loadAttributes ,
89
- int $ linkType ,
90
- ContextInterface $ context
91
- ): array {
85
+ private function findRelations (array $ products , array $ loadAttributes , int $ linkType ): array
86
+ {
92
87
//Loading relations
93
88
$ relations = $ this ->relatedProductDataProvider ->getRelations ($ products , $ linkType );
94
89
if (!$ relations ) {
@@ -101,8 +96,7 @@ private function findRelations(
101
96
$ this ->searchCriteriaBuilder ->create (),
102
97
$ loadAttributes ,
103
98
false ,
104
- true ,
105
- $ context
99
+ true
106
100
);
107
101
//Filling related products map.
108
102
/** @var \Magento\Catalog\Api\Data\ProductInterface[] $relatedProducts */
@@ -150,7 +144,7 @@ public function resolve(ContextInterface $context, Field $field, array $requests
150
144
$ fields = array_unique (array_merge ([], ...$ fields ));
151
145
152
146
//Finding relations.
153
- $ related = $ this ->findRelations ($ products , $ fields , $ this ->getLinkType (), $ context );
147
+ $ related = $ this ->findRelations ($ products , $ fields , $ this ->getLinkType ());
154
148
155
149
//Matching requests with responses.
156
150
$ response = new BatchResponse ();
0 commit comments