19 declare(strict_types=1);
41 if (0 === count($errors)) {
45 $errorsToDisplay = [];
46 foreach ($errors as $error) {
47 $translation = $this->
lng->txt($error->getLanguageVariable());
48 if ($translation ===
'-' . $error->getLanguageVariable() .
'-') {
49 $translation = $error->getLanguageVariable();
53 $translation === $error->getLanguageVariable() ||
54 0 === count($error->getPlaceHolderValues())
56 $errorsToDisplay[] = $translation;
58 $escapedPlaceholderValues = array_map(
static function (
string $address):
string {
60 }, $error->getPlaceHolderValues());
62 array_unshift($escapedPlaceholderValues, $translation);
63 $errorsToDisplay[] = sprintf(...$escapedPlaceholderValues);
68 'tpl.mail_new_submission_errors.html',
73 if (1 === count($errorsToDisplay)) {
74 $tpl->setCurrentBlock(
'single_error');
75 $tpl->setVariable(
'SINGLE_ERROR', current($errorsToDisplay));
77 $firstError = array_shift($errorsToDisplay);
79 foreach ($errorsToDisplay as $error) {
80 $tpl->setCurrentBlock(
'error_loop');
81 $tpl->setVariable(
'ERROR', $error);
82 $tpl->parseCurrentBlock();
85 $tpl->setCurrentBlock(
'multiple_errors');
86 $tpl->setVariable(
'FIRST_ERROR', $firstError);
88 $tpl->parseCurrentBlock();
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl