public getProductFromRaw ( Sonata\Component\Order\OrderElementInterface $orderElement, string $type, string $format = 'json' ) : Sonata\Component\Product\ProductInterface | ||
$orderElement | Sonata\Component\Order\OrderElementInterface | |
$type | string | |
$format | string | |
리턴 | Sonata\Component\Product\ProductInterface |
public function getProductFromRaw(OrderElementInterface $orderElement, $type, $format = 'json')
{
return $this->serializer->deserialize(json_encode($orderElement->getRawProduct()), $type, $format);
}