public __construct ( Symfony\Component\Translation\TranslatorInterface $translator, $defaultGroup, array $groups ) | ||
$translator | Symfony\Component\Translation\TranslatorInterface | |
$groups | array |
public function __construct(TranslatorInterface $translator, $defaultGroup, array $groups)
{
$translatedGroups = [];
foreach ($groups as $groupIdentifier) {
$translatedGroups[$groupIdentifier] = $translator->trans($groupIdentifier, [], 'ezplatform_fields_groups');
}
$this->groups = $translatedGroups;
$this->defaultGroup = $defaultGroup;
$this->translator = $translator;
}