EasyAdminBundle
EasyAdminBundle copied to clipboard
Add option to configure actions of FormField / Panel
Resolves #3519.
FormField::addPanel('Identität')
->configureActions(fn(Actions $actions) => $actions
->add(Crud::PAGE_DETAIL, Action::new('another', 'Another')->linkToUrl('...')->addCssClass('btn btn-secondary'))
->add(Crud::PAGE_DETAIL, Action::new('test', 'Test', 'fa fa-home')->linkToUrl('...')->addCssClass('btn btn-link'))
)

Nice feature!
Since this PR new methods were implemented: FormField::addRow and FormField::addTab, so I'm not sure if the it should be changed to:
FormField::addPanel(
'Identität',
null,
fn(Actions $actions) => $actions->add(Crud::PAGE_DETAIL, Action::new('another', 'Another')->linkToUrl('...')->addCssClass('btn btn-secondary')))
;
Or how can we limit it to panels (excluding rows and tabs) in another way?