rvanlaak / SettingsBundle

Database centric Symfony2 configuration management bundle. Global and per-entity settings supported.
MIT License
113 stars 61 forks source link

Feature: integration with EasyAdmin #115

Open hafkenscheid opened 3 years ago

hafkenscheid commented 3 years ago

I have the idea that it might be usefull to have integration with easyadmin.

rvanlaak commented 3 years ago

Would be great! Any starting point on how to achieve that? Would you have time to work on a draft PR together?

hafkenscheid commented 3 years ago

There are several possibilities, in my opinion the best being a CrudController linked to this bundle that can be integrated in an EA3 dashboard. However, several other rework needs to be done first to regain compatibility with SF5.x and PHP8. See also #114

hafkenscheid commented 3 years ago

I have been rethinking this integration. Basically I see two options:

  1. Integration of the existing Setting-forms in the EasyAdmin template which is a simple change
  2. The CrudController as suggested above

For the second integration there are some challenges. At first, being the fact that settings don't have database entries before being saved which makes them unavailable in Crud::PAGE_INDEX views. Furthermore we need to think about the current forms having one form for all settings entries, while it might make more sense to edit op a per setting basis.

rvanlaak commented 3 years ago

Could you give a ballpark on how much code would be needed to add EasyAdmin support? I have no strong opinion on adding it to this bundle, but would introducing a separate bridge bundle be a more viable option?

Chris53897 commented 1 year ago

One simple solution could be to just make a copy-paste integration. Example: https://github.com/Dukecity/CommandSchedulerBundle/blob/master/Resources/doc/integrations/easyadmin/ScheduledCommandCrudController.php