symfony-cmf/core-bundle

[AdminExtensions] make the form groups configurable

uwej711 opened this issue · 5 comments

and default to form.group_general

N.B. I can do the PR if this is OK for others something like

cmf_core:
    admin:
        extensions:
            translateable:
                form_group: my-group

or maybe make it configurable per admin class ... that probably would make more sense, but looks not so easy without changes to sonata admin.

changing this in the admin class seems not possible since the extension gets called after configureFormFields.

Not sure what exactly you want to do but I'm guessing you want to change the order in which the fields are displayed from an admin extension? In that case it would be a sonata admin bundle issue for sure. Also you probably want to add some sort of priority sort for that, because you have no knowledge of what fields are registered before the admin and it's extension are all done adding fields to your form.

I'm talking of the string constant in https://github.com/symfony-cmf/CoreBundle/blob/master/Admin/Extension/TranslatableExtension.php#L47, 'form.group_general'

If I organize my admin i might put all translatable fields in one group with the locale, it is unfortunate too, that the locale is then the last field.

Aah guessed wrong then.

dbu commented

i agree with this change, was feeling a bit uncomfortable with hardcoding them. can you make them default to the current groups to not break any BC? for consistency, we should do the same in routing and menu admin extensions...

i guess we do one per admin extension, even though the publish workflow ones usually should be in the same group? or just one for the publish workflow? in later versions, there are likely other publish workflow things than publishable and timeperiod...

dbu commented

fixed by #110