Conditions | 2 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function consumeEvent(TransformEvent $event): void |
||
24 | { |
||
25 | $this->buildProperty($event, ProductInterface::class, |
||
26 | function (ProductInterface $product, Document $document): void { |
||
27 | /** @var ProductTranslationInterface $productTranslation */ |
||
28 | foreach ($product->getTranslations() as $productTranslation) { |
||
29 | $propertyName = $this->productShortDescriptionNameResolver->resolvePropertyName( |
||
30 | $productTranslation->getLocale() |
||
31 | ); |
||
32 | $document->set($propertyName, $productTranslation->getShortDescription()); |
||
33 | } |
||
38 |