/** * {@inheritdoc} */ public function addOrderElement(OrderElementInterface $orderElement) { $this->orderElements[] = $orderElement; $orderElement->setOrder($this); }
/** * @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); }