Categories
Symfony how to get to doctrine from static methode?
Hello everyone, any idea how to get to doctrine from static methode? $this is not available. Well, global $kernel, I think it's not beautiful.
Answer the question
In order to leave comments, you need to log in
The only human option is to pass doctrine (apparently meaning entity manager) as an argument to this static method.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question