You are here

public static function Shipment::create in Ubercart 8.4

Creates a Shipment.

Parameters

array $values: (optional) Array of initialization values.

Return value

\Drupal\uc_fulfillment\Shipment A Shipment object.

2 calls to Shipment::create()
Manual::fulfillOrder in shipping/uc_fulfillment/src/Plugin/Ubercart/FulfillmentMethod/Manual.php
Fulfills the order using this method.
Shipment::load in shipping/uc_fulfillment/src/Shipment.php
Loads a shipment and its packages.

File

shipping/uc_fulfillment/src/Shipment.php, line 356

Class

Shipment
Defines the Shipment class.

Namespace

Drupal\uc_fulfillment

Code

public static function create(array $values = NULL) {
  $shipment = new Shipment();
  if (isset($values)) {
    foreach ($values as $key => $value) {
      $shipment->{$key} = $value;
    }
  }
  return $shipment;
}