P
P
P7472020-02-26 14:19:37
symfony
P747, 2020-02-26 14:19:37

Symfony 4 extending and intercepting HttpKernel actions?

Good afternoon, I want to create based on symfony 4 - cms, in which you can manage modules (enable / disable / configure). How to properly intercept and extend the functionality of HttpKernel, do I need flattery in the kernel?

I found this article, but I did not fully understand from what "place" to do it all

https://symfony.ru/doc/current/components/http_ker...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max Kuznetsov, 2020-04-06
@pluseg

P747 Is this question a continuation of the previous one about modularity? :) Give more data, what kind of modules do you want. What are the use cases?
If you need to collect assemblies consisting of certain features and give them to downloaders, then these are the previously mentioned symfony / flex with its recipes for bundles. You can write your own recipes if you want to change the default bundle initialization values.
If the question is a dynamic change in functionality, then the question is what this dynamics depends on.
- You can rewrite the ControllerResolver,
- You can simply hang the EventListener on the earliest event, which even before the ControllerResolver'a fires.
- Possible at the request routing level
- You can also resolve components at the Security level - through roles, vouters, ACLs (depending on the complexity of the required rights).
- You can create a super-admin dashboard that will pull the toggle switches for features, and the code will already hide or show them. In general, this option goes side by side with the previous one.
In general, details of a specific task are needed, there are a lot of options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question