if ($id === null
) { return null;
} $criteria =
new Criteria([$id]);
return $this->
loadOrder($criteria,
$storableFlow->
getContext(),
$id);
} private function loadOrder(Criteria
$criteria, Context
$context, string
$orderId): ?OrderEntity
{ $criteria->
addAssociations([ 'orderCustomer',
'orderCustomer.salutation',
'lineItems.downloads.media',
'lineItems.cover',
'deliveries.shippingMethod',
'deliveries.shippingOrderAddress.country',
'deliveries.shippingOrderAddress.countryState',
'stateMachineState',
'transactions.stateMachineState',
'transactions.paymentMethod',
'deliveries.stateMachineState',