$response[] =
[ 'type' => 'success',
'alert' =>
$message,
];
} catch (ConstraintViolationException
$formViolations) { $violations =
[];
foreach ($formViolations->
getViolations() as $violation) { $violations[] =
$violation->
getMessage();
} $response[] =
[ 'type' => 'danger',
'alert' =>
$this->
renderView('@Storefront/storefront/utilities/alert.html.twig',
[ 'type' => 'danger',
'list' =>
$violations,
]),
];
} catch (RateLimitExceededException
$exception) { $response[] =
[ 'type' => 'info',
'alert' =>
$this->
renderView('@Storefront/storefront/utilities/alert.html.twig',
[ 'type' => 'info',
'content' =>
$this->
trans('error.rateLimitExceeded',
['%seconds%' =>
$exception->
getWaitTime()]),
]),
];