@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | private function addPreSetDataListener(FormBuilderInterface $builder, $fieldName, $translations, $fieldType, $class, $required, $className, $id) |
86 | 86 | { |
87 | 87 | // 'populate' fields by *hook on form generation |
88 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($fieldName, $translations, $fieldType, $class, $required, $className, $id) { |
|
88 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($fieldName, $translations, $fieldType, $class, $required, $className, $id) { |
|
89 | 89 | $form = $event->getForm(); |
90 | 90 | foreach ($this->locales as $locale) { |
91 | 91 | $data = (array_key_exists($locale, $translations) && array_key_exists($fieldName, $translations[$locale])) ? $translations[$locale][$fieldName] : null; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | private function addPostSubmitListener(FormBuilderInterface $builder, $fieldName, $className, $id) |
111 | 111 | { |
112 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($fieldName, $className, $id) { |
|
112 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($fieldName, $className, $id) { |
|
113 | 113 | $form = $event->getForm(); |
114 | 114 | $this->manager->persistTranslations($form, $className, $fieldName, $id, $this->locales); |
115 | 115 | }); |