Closed michaelv closed 10 years ago
the bundle only wraps fosub's behaviour, see here: https://github.com/PUGX/PUGXMultiUserBundle/blob/master/DependencyInjection/Compiler/OverrideServiceCompilerPass.php
so, you can do a similar thing in your project, overriding pugx form factories.
anyway, for a country dropdown field you can use a country field type http://symfony.com/doc/current/reference/forms/types/country.html
Hi leopro,
Thank you very much for the quick reply!
hello,
@michaelv did you try to override pugx form factories?
@leopro i am trying to do so, but isn't the user discriminator model (pugx_user.manager.user_discriminator service) that instantiate the form type ( https://github.com/PUGX/PUGXMultiUserBundle/blob/master/Model/UserDiscriminator.php#L146 )?
So shouldn't be the user discriminator overrided as well? [edit] in order to pass extra args to the form type? [/edit]
Hi,
I recently started using the PUGXMultiUserBundle, but there doesn't seem to be the possibility to pass additional parameters to the constructor of RegistrationFormType. The reason to pass these parameters is because the form contains a 'country' dropdown field which needs to be localized. The countries come from a database, while the translations come from the translation files.
My RegistrationFormType looks like this:
config.yml:
Acme/Bundle/UserBundle/Resources/config/services.xml :
I get this error:
If I leave out this part from config.yml:
I get this error:
Could you please help me out with this?
Thanks alot!
Kr, Michael