Sonata\ProductBundle\Model\BaseProductProvider::getProductFromRaw PHP Method

getProductFromRaw() public method

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
return Sonata\Component\Product\ProductInterface
    public function getProductFromRaw(OrderElementInterface $orderElement, $type, $format = 'json')
    {
        return $this->serializer->deserialize(json_encode($orderElement->getRawProduct()), $type, $format);
    }