You are here

public function OrderAssignment::assignMultiple in Commerce Core 8.2

Assigns multiple orders to the given customer.

Parameters

\Drupal\commerce_order\Entity\OrderInterface[] $orders: The orders.

\Drupal\user\UserInterface $customer: The customer.

Overrides OrderAssignmentInterface::assignMultiple

File

modules/order/src/OrderAssignment.php, line 61

Class

OrderAssignment

Namespace

Drupal\commerce_order

Code

public function assignMultiple(array $orders, UserInterface $customer) {
  foreach ($orders as $order) {
    $this
      ->assign($order, $customer);
  }
}