Skip to content

Commit

Permalink
Added internal translate method
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Feb 21, 2024
1 parent d258e8b commit c228ca4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AbstractForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,13 @@ protected function handleUniqueConstraintViolation(UniqueException $e, callable
$form->addError($message);
}
}


/**
* ? Used to translate prompts when translator is removed from ChoiceControl
*/
protected function translate(string $message, array $params = []): string
{
return $this->translator?->translate($message, $params) ?? $message;
}
}

0 comments on commit c228ca4

Please sign in to comment.