Skip to content

Add interfaces to edit comfy configurations in easy admin.

License

Notifications You must be signed in to change notification settings

oliverde8/comfyEasyAdminBundle

Repository files navigation

Comfy Easy Admin Bundle

Scrutinizer Code Quality Build Status Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License

This bundle adds the edition interface to easy admin so that admins can configure their site using comfy bundle.

Check Comfy bundles documentation here alt text

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.

About

Add interfaces to edit comfy configurations in easy admin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published