Conditions | 2 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function consumeEvent(PostTransformEvent $event): void |
||
30 | { |
||
31 | $this->buildProperty( |
||
32 | $event, |
||
33 | ProductInterface::class, |
||
34 | function (ProductInterface $product, Document $document): void { |
||
35 | /** @var ProductTranslationInterface $productTranslation */ |
||
36 | foreach ($product->getTranslations() as $productTranslation) { |
||
37 | $propertyName = $this->productDescriptionNameResolver->resolvePropertyName( |
||
38 | $productTranslation->getLocale() |
||
39 | ); |
||
40 | $document->set($propertyName, $productTranslation->getDescription()); |
||
41 | } |
||
46 |