[Form] Pass translation domain to the sub-forms when choice list is expanded

This commit is contained in:
alexandresalome 2012-01-21 14:19:08 +01:00
parent f842739d58
commit 0513eb1a4f

View File

@ -63,11 +63,13 @@ class ChoiceType extends AbstractType
// The user can check 0 or more checkboxes. If required
// is true, he is required to check all of them.
'required' => false,
'translation_domain' => $options['translation_domain'],
));
} else {
$builder->add((string) $choice, 'radio', array(
'value' => $choice,
'label' => $value,
'translation_domain' => $options['translation_domain'],
));
}
}