Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function create(array $attributeValues, string $locale): array |
||
24 | { |
||
25 | $attributeValuesView = []; |
||
26 | |||
27 | /** @var ProductAttributeValueInterface $attributeValue */ |
||
28 | foreach ($attributeValues as $attributeValue) { |
||
29 | if (!in_array($attributeValue->getCode(), $this->allowedAttributesCodes, true)) { |
||
30 | continue; |
||
31 | } |
||
32 | |||
33 | $attributeValuesView[] = $this->productAttributeValueViewFactory->create($attributeValue, $locale); |
||
34 | } |
||
35 | |||
36 | return $attributeValuesView; |
||
37 | } |
||
38 | } |
||
39 |