interface PackerManagerInterface in Commerce Shipping 8.2
Runs the added packers one by one until one of them returns a result.
Hierarchy
- interface \Drupal\commerce_shipping\PackerManagerInterface
Expanded class hierarchy of PackerManagerInterface
All classes that implement PackerManagerInterface
See also
\Drupal\commerce_shipment\ProposedShipment
\Drupal\commerce_shipment\Packer\PackerInterface
1 file declares its use of PackerManagerInterface
- ShippingInformation.php in src/
Plugin/ Commerce/ CheckoutPane/ ShippingInformation.php
File
- src/
PackerManagerInterface.php, line 15
Namespace
Drupal\commerce_shippingView source
interface PackerManagerInterface {
/**
* Adds a packer.
*
* @param \Drupal\commerce_shipping\Packer\PackerInterface $packer
* The packer.
*/
public function addPacker(PackerInterface $packer);
/**
* Gets all added packers.
*
* @return \Drupal\commerce_shipping\Packer\PackerInterface[]
* The packers.
*/
public function getPackers();
/**
* Packs the given order.
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
* @param \Drupal\profile\Entity\ProfileInterface $shipping_profile
* The shipping profile.
*
* @return \Drupal\commerce_shipping\ProposedShipment[]
* The proposed shipments.
*/
public function pack(OrderInterface $order, ProfileInterface $shipping_profile);
/**
* Packs the given order and populates the given shipments.
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
* @param \Drupal\profile\Entity\ProfileInterface $shipping_profile
* The shipping profile.
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface[] $shipments
* The shipments to populate.
*
* @return array
* An array with the populated shipments as the first element, and the
* removed shipments as the second.
*/
public function packToShipments(OrderInterface $order, ProfileInterface $shipping_profile, array $shipments);
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PackerManagerInterface:: |
public | function | Adds a packer. | 1 |
PackerManagerInterface:: |
public | function | Gets all added packers. | 1 |
PackerManagerInterface:: |
public | function | Packs the given order. | 1 |
PackerManagerInterface:: |
public | function | Packs the given order and populates the given shipments. | 1 |