public function PackerManagerInterface::packToShipments in Commerce Shipping 8.2
Packs the given order and populates the given shipments.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
\Drupal\profile\Entity\ProfileInterface $shipping_profile: The shipping profile.
\Drupal\commerce_shipping\Entity\ShipmentInterface[] $shipments: The shipments to populate.
Return value
array An array with the populated shipments as the first element, and the removed shipments as the second.
1 method overrides PackerManagerInterface::packToShipments()
- PackerManager::packToShipments in src/
PackerManager.php - Packs the given order and populates the given shipments.
File
- src/
PackerManagerInterface.php, line 60
Class
- PackerManagerInterface
- Runs the added packers one by one until one of them returns a result.
Namespace
Drupal\commerce_shippingCode
public function packToShipments(OrderInterface $order, ProfileInterface $shipping_profile, array $shipments);