You are here

interface OrderAssignmentInterface in Commerce Core 8.2

Handles assigning orders to customers.

Hierarchy

Expanded class hierarchy of OrderAssignmentInterface

All classes that implement OrderAssignmentInterface

2 files declare their use of OrderAssignmentInterface
CompletionRegister.php in modules/checkout/src/Plugin/Commerce/CheckoutPane/CompletionRegister.php
OrderReassignForm.php in modules/order/src/Form/OrderReassignForm.php

File

modules/order/src/OrderAssignmentInterface.php, line 11

Namespace

Drupal\commerce_order
View source
interface OrderAssignmentInterface {

  /**
   * Assigns the order to the given customer.
   *
   * @param \Drupal\commerce_order\Entity\OrderInterface $order
   *   The order.
   * @param \Drupal\user\UserInterface $customer
   *   The customer.
   * @param bool $save_order
   *   Whether the order should be saved.
   */
  public function assign(OrderInterface $order, UserInterface $customer, $save_order = TRUE);

  /**
   * Assigns multiple orders to the given customer.
   *
   * @param \Drupal\commerce_order\Entity\OrderInterface[] $orders
   *   The orders.
   * @param \Drupal\user\UserInterface $customer
   *   The customer.
   */
  public function assignMultiple(array $orders, UserInterface $customer);

}

Members

Namesort descending Modifiers Type Description Overrides
OrderAssignmentInterface::assign public function Assigns the order to the given customer. 1
OrderAssignmentInterface::assignMultiple public function Assigns multiple orders to the given customer. 1