When implementing this, the new field should be added in the same tab and group where the addPositionReference is placed in. $currentGroup and $currentTab of BaseGroupedMapper shouldnt be changed when invoking this add method to beware of sideEffects
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Feature Request
It would be a great feature to pass order information when adding a field to a BaseGroupedMapper (e.g. FormMapper, ShowMapper etc) out of the box.
Usecase is when adding fields in a generic AdminExtension
So we currently use following workaround methods:
that simply add the field to the mapper and afterwards trigger a
$formMapper->reorder($newCalculatedOrder);
Since the FormMapper and ShowMapper are final this workaround is realy ugly when trying to respect the form groups and tabs.
Can you imagine to allow adding this as feature of the SonataAdminBundle.
Maybe by passing two new fieldDescriptionOptions
It may be thinkable to pass multiple elements to insert at to be more failsafe if $fiendName does not exist.
When implementing this, the new field should be added in the same tab and group where the addPositionReference is placed in. $currentGroup and $currentTab of BaseGroupedMapper shouldnt be changed when invoking this add method to beware of sideEffects