interface ShipmentManagerInterface in Commerce Shipping 8.2
Manages shipments.
Hierarchy
- interface \Drupal\commerce_shipping\ShipmentManagerInterface
Expanded class hierarchy of ShipmentManagerInterface
All classes that implement ShipmentManagerInterface
1 file declares its use of ShipmentManagerInterface
- ShippingRateWidget.php in src/
Plugin/ Field/ FieldWidget/ ShippingRateWidget.php
File
- src/
ShipmentManagerInterface.php, line 10
Namespace
Drupal\commerce_shippingView source
interface ShipmentManagerInterface {
/**
* Applies the given shipping rate to the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
* @param \Drupal\commerce_shipping\ShippingRate $rate
* The shipping rate.
*/
public function applyRate(ShipmentInterface $shipment, ShippingRate $rate);
/**
* Calculates rates for the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
*
* @return \Drupal\commerce_shipping\ShippingRate[]
* The rates.
*/
public function calculateRates(ShipmentInterface $shipment);
/**
* Selects the default rate for the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
* @param \Drupal\commerce_shipping\ShippingRate[] $rates
* The available rates.
*
* @return \Drupal\commerce_shipping\ShippingRate
* The selected rate.
*/
public function selectDefaultRate(ShipmentInterface $shipment, array $rates);
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ShipmentManagerInterface:: |
public | function | Applies the given shipping rate to the given shipment. | 1 |
ShipmentManagerInterface:: |
public | function | Calculates rates for the given shipment. | 1 |
ShipmentManagerInterface:: |
public | function | Selects the default rate for the given shipment. | 1 |