public function Shipment::setShippingMethod in Commerce Shipping 8.2
Sets the shipping method.
Parameters
\Drupal\commerce_shipping\Entity\ShippingMethodInterface $shipping_method: The shipping method.
Return value
$this
Overrides ShipmentInterface::setShippingMethod
File
- src/
Entity/ Shipment.php, line 168
Class
- Shipment
- Defines the shipment entity class.
Namespace
Drupal\commerce_shipping\EntityCode
public function setShippingMethod(ShippingMethodInterface $shipping_method) {
$this
->set('shipping_method', $shipping_method);
return $this;
}