You are here

protected function CheckoutController::loadOrder in Ubercart 8.4

Loads the order that is being processed for checkout from the session.

Return value

\Drupal\uc_order\OrderInterface The order object.

3 calls to CheckoutController::loadOrder()
CheckoutController::checkout in uc_cart/src/Controller/CheckoutController.php
Builds the cart checkout page from available checkout pane plugins.
CheckoutController::complete in uc_cart/src/Controller/CheckoutController.php
Completes the sale and finishes checkout.
CheckoutController::review in uc_cart/src/Controller/CheckoutController.php
Allows a customer to review their order before finally submitting it.

File

uc_cart/src/Controller/CheckoutController.php, line 283

Class

CheckoutController
Controller routines for the checkout.

Namespace

Drupal\uc_cart\Controller

Code

protected function loadOrder() {
  $id = $this->session
    ->get('cart_order');

  // Reset uc_order entity cache then load order.
  $storage = $this
    ->entityTypeManager()
    ->getStorage('uc_order');
  $storage
    ->resetCache([
    $id,
  ]);
  return $storage
    ->load($id);
}