public function CheckoutOrderManager::getCheckoutFlow in Commerce Core 8.2
Gets the order's checkout flow.
Parameters
\Drupal\commerce_order\Entity\OrderInterface $order: The order.
Return value
\Drupal\commerce_checkout\Entity\CheckoutFlowInterface THe checkout flow.
Overrides CheckoutOrderManagerInterface::getCheckoutFlow
1 call to CheckoutOrderManager::getCheckoutFlow()
- CheckoutOrderManager::getCheckoutStepId in modules/
checkout/ src/ CheckoutOrderManager.php - Gets the order's checkout step ID.
File
- modules/
checkout/ src/ CheckoutOrderManager.php, line 33
Class
- CheckoutOrderManager
- Manages checkout flows for orders.
Namespace
Drupal\commerce_checkoutCode
public function getCheckoutFlow(OrderInterface $order) {
if (!$order
->get('checkout_flow')->entity) {
$checkout_flow = $this->chainCheckoutFlowResolver
->resolve($order);
$order
->set('checkout_flow', $checkout_flow);
$order
->save();
}
return $order
->get('checkout_flow')->entity;
}