oliverde8 / comfy-easy-admin-bundle
Add interfaces to edit comfy configurations in easy admin.
1.0.0-alpha3
2021-08-24 15:17 UTC
Requires
- php: >=7.4.0
- easycorp/easyadmin-bundle: ^3.2
- oliverde8/comfy-bundle: ~1.0
This package is auto-updated.
Last update: 2024-11-05 15:33:39 UTC
README
This bundle adds the edition interface to easy admin so that admins can configure their site using comfy bundle.
Check Comfy bundles documentation here
Install
composer require oliverde/comfy-easy-admin-bundle
To add a link to the menu edit your DashnoardController
to inject the MenuConfigurator service:
protected MenuConfigurator $menuConfigurator; /** * DashboardController constructor. * @param ConfigInterface $testConfig */ public function __construct(MenuConfigurator $menuConfigurator) { $this->menuConfigurator = $menuConfigurator; }
and now add the Menu link
public function configureMenuItems(): iterable { /** Other menu elements .... */ yield $this->menuConfigurator->getMenuItem(); }
Finally add the add router.
comfy_bundle: resource: '@oliverde8ComfyEasyAdminBundle/Controller' type: annotation prefix: /admin
You are ready to go, to create configuration elements check comfy bundles documentation
Permissions
By default any one with access to the EasyAdmin interface can edit any configuration.
To limit this rewrite the ConfigEditVoter
service with your own.
TODO
- Allow separate view & edit permission.