| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function create(ProductAttributeValueInterface $productAttributeValue, string $locale): ProductAttributeValueView |
||
| 25 | { |
||
| 26 | /** @var ProductAttributeValueView $productAttributeValueView */ |
||
| 27 | $productAttributeValueView = new $this->productAttributeValueViewClass(); |
||
| 28 | |||
| 29 | $productAttributeValueView->code = $productAttributeValue->getCode(); |
||
| 30 | $productAttributeValueView->value = $productAttributeValue->getValue(); |
||
| 31 | |||
| 32 | $productAttribute = $productAttributeValue->getAttribute(); |
||
| 33 | |||
| 34 | /** @var ProductAttributeTranslationInterface $productAttributeTranslation */ |
||
| 35 | $productAttributeTranslation = $productAttribute->getTranslation($locale); |
||
| 36 | $productAttributeValueView->name = $productAttributeTranslation->getName(); |
||
| 37 | |||
| 38 | return $productAttributeValueView; |
||
| 39 | } |
||
| 40 | } |
||
| 41 |