} /**
* @throws ConstraintViolationException
*/
private function validateOrderData( ParameterBag
$data,
SalesChannelContext
$context,
bool
$hasVirtualGoods ): void
{ $definition =
$this->
getOrderCreateValidationDefinition(new DataBag($data->
all()),
$context,
$hasVirtualGoods);
$violations =
$this->dataValidator->
getViolations($data->
all(),
$definition);
if ($violations->
count() > 0
) { throw new ConstraintViolationException($violations,
$data->
all());
} } private function getOrderCreateValidationDefinition( DataBag
$data,
SalesChannelContext
$context,
bool
$hasVirtualGoods ):