I am using translatable table by doctorine2 extension
I have successfully implemented input and output data for each languages.
However I would like to edit the multiple language at the same time. like this below this codes is not correct, however that's what I want to do.
Is there good solution for this purpose?
in php
$form = $this->createFormBuilder($attrSchool)
->add('description fr')
->add('description ch)
->add('description en)->getForm();
in twig
<form action="http://myserver.com/">
{{ form_widget(form.description fr) }}
{{ form_widget(form.description ch) }}
{{ form_widget(form.description en) }}
<input type=submit>
</form>
Now I understood I should use github.com/a2lix/TranslationFormBundle thanks to the @ghanbari 's comment
So, I decided to choose.
"stof/doctrine-extensions-bundle": "1.2.*@dev",
and
"a2lix/translation-form-bundle": "1.*@dev",
then set up according to here
then I set up a2lix in my sonataadminbundle class myEntity.php
$formMapper
->with('General')
->add('description','a2lix_translations_gedmo', array(
'translatable_class' => 'Acme\UserBundle\Entity\myEntity'))
when I choose 'Add new' in admin bundle page translation tab appear correctly.
However I choose edit existed-one,
Expected argument of type "object, array or empty", "string" given
this error message appears.
'Acme\UserBundle\Entity\myEntity' is surely the class existing in my project.
Why it happens ?