You are here

public static function Order::getWorkflowId in Commerce Core 8.2

Gets the workflow ID for the state field.

Parameters

\Drupal\commerce_order\Entity\OrderInterface $order: The order.

Return value

string The workflow ID.

File

modules/order/src/Entity/Order.php, line 973

Class

Order
Defines the order entity class.

Namespace

Drupal\commerce_order\Entity

Code

public static function getWorkflowId(OrderInterface $order) {
  $workflow = OrderType::load($order
    ->bundle())
    ->getWorkflowId();
  return $workflow;
}