Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using multiple extensions with EasyAdmin #175

Closed
DylanKas opened this issue Mar 4, 2020 · 3 comments
Closed

Using multiple extensions with EasyAdmin #175

DylanKas opened this issue Mar 4, 2020 · 3 comments

Comments

@DylanKas
Copy link
Contributor

DylanKas commented Mar 4, 2020

Hello!

We decided to use this bundle for our project (especially the embedded list feature) and it works great so well done!

We are trying to use some features from Wandi Extension bundle as well but we face some issues configurating both of them at the same time.

We used to have :

#routes/easy_admin.yaml
easy_admin_bundle:
  resource: '@EasyAdminExtensionBundle/Controller/EasyAdminController.php'
  prefix: /admin
  type: annotation

And it was fine when using only this bundle. However, now we want to use this bundle as well as the one quoted previously but it also need to replace the easyadmin controller by the one from the new bundle.

So both extension wants to do the same thing and both extends the BaseAdminController from EasyAdmin.

What would be the best way to use both in a same project ?
Maybe having an usable trait to use instead of extending the Controller would work so that we could juste use the two traits instead of trying to basically extends 2 controller ?

Thanks in advance.

@alterphp
Copy link
Owner

alterphp commented Mar 4, 2020

Hi @DylanKas !

We may put the code of the controller in a trait. But conflicts (isActionAllowed) must be resolved on the holding project side.

Can you try this with an AdminExtensionControllerTrait and test it for your use before sending a PR ?

@DylanKas
Copy link
Contributor Author

DylanKas commented Mar 4, 2020

Yes, I'm gonna do that tomorrow.

@DylanKas
Copy link
Contributor Author

DylanKas commented Mar 5, 2020

I made the pull request and tested it on my projet, it was much easier to use two extensions but it would be for the best if Wandi Extension Bundle did the same so I will try to contact him as well.

@DylanKas DylanKas changed the title Using multiple extension with EasyAdmin Using multiple extensions with EasyAdmin Mar 5, 2020
@alterphp alterphp closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants