Answer the question
In order to leave comments, you need to log in
Symfony 4 - how to pass entity to controller dynamically?
Good afternoon, is it possible to transfer an entity to the controller somehow dynamically?
The controller is called via TWIG.
A solution is needed very urgently.
Who has any ideas?
Thanks a lot, everyone
Answer the question
In order to leave comments, you need to log in
A controller in a templating engine... sounds like trash.
Write down the service for your entity and pull it already - yes, by shit, but quickly. It is good for the template engine to prepare all the data in advance.
{{ render(controller('App\\Some\\GovnoController::govnoMethod', {'entity': entity.id})) }}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question