Open Chris53897 opened 5 months ago
Makes sense but maybe you can add constants and documentation for these new options as well? If possible a unit test as well?
I can to. Maybe Enum instead of Constants. But maybe i will find a better way to implement it.
getLabel(...)
that can be overwritten by the Users. I will need to have a look if this works and is easy to implement.
Another idea is to use placeholders similar to how it works in translations maybe? And we can have:
%code%
to be the currency code%name%
to be the currency name that you addedAnd then we can have a string instead to define the format/template to use, and it is very easy to extend maybe? (Default could then be %code%
as that is the current default.
Is this something you plan to work on @Chris53897 or should we close it?
The earliest possible time for open source work is end of september for me. I will try to have a look at your placeholder idea.
Thanks @Chris53897 - will leave this open then :)
https://github.com/TheBigBrainsCompany/TbbcMoneyBundle/issues/171
I am not sure what is the best way to implement it. With this implementation it is an opt-in for the longer labels.
Default
With local currency name (german)
Usage: ->add('currency', CurrencyType::class, ['label' => 'foo', 'currency_choices_label_format' => 1])