Example #1
0
 /**
  * @param \Orm\Zed\Sales\Persistence\SpySalesOrder $orderEntity
  * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
  *
  * @return void
  */
 protected function hydrateShipmentMethodToOrderTransfer(SpySalesOrder $orderEntity, OrderTransfer $orderTransfer)
 {
     $shipmentMethodTransfer = new ShipmentMethodTransfer();
     $shipmentMethodEntity = $orderEntity->getShipmentMethod();
     if (!empty($shipmentMethodEntity)) {
         $shipmentMethodTransfer->fromArray($shipmentMethodEntity->toArray(), true);
         $shipmentMethodTransfer->setCarrierName($shipmentMethodEntity->getShipmentCarrier()->getName());
         $orderTransfer->setShipmentMethod($shipmentMethodTransfer);
     }
 }