Я использую a2lix/TranslationFormBundle и пытаюсь добавить поле EntityType.
Я получил эту ошибку, когда я пытаюсь построить форму:
The option "0" does not exist. Known options are: "action", "attr", "auto_initialize", "block_name", "by_reference", "compound", "csrf_field_name", "csrf_message", "csrf_protection", "csrf_provider", "csrf_token_id", "csrf_token_manager", "data", "data_class", "disabled", "empty_data", "error_bubbling", "inherit_data", "intention", "label", "label_attr", "label_format", "mapped", "max_length", "method", "pattern", "post_max_size_message", "property_path", "read_only", "required", "translation_domain", "trim", "virtual"
вот мой FormType
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use A2lix\TranslationFormBundle\Form\Type\TranslationsType;
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('tag', TextType::class)
->add('translations', TranslationsType::class, [
'fields' => [
'promotion' => ['field_type' => EntityType::class, [
'class' => 'AdminBundle:Promotion',
'choice_label' => 'getName'
] ]
]
])
->add('Save', SubmitType::class)
;
}
Когда я использую поле EntityType вне поля TranslationType, оно работает. Но когда я использую его в TranslationType, это не так.
Любая помощь будет оценена