/**
* @param OrderElementInterface $orderElement
* @param string $type
* @param string $format
*
* @return \Sonata\Component\Product\ProductInterface
*/
public function getProductFromRaw(OrderElementInterface $orderElement, $type, $format = 'json')
{
return $this->serializer->deserialize(json_encode($orderElement->getRawProduct()), $type, $format);
}