S
S
symnoob2021-03-02 19:30:35
symfony
symnoob, 2021-03-02 19:30:35

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

1 answer(s)
D
D3lphi, 2021-03-02
@symnoob

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 your question

Ask a Question

731 491 924 answers to any question