nette 2.0 to 3.1 and link method
- mystik
- Member | 313
Above method should still work I think. Maybe just replace magic property access with direct getPresenter().
Thats way I asked how exactly it fails.
But accessing presenter from global state of Application is not very clean and might fail if used before current presenter id determined in reguest dispatching flow.
Where is this method located? Why cannot you pass presenter from caller instead of Application? I would need a bit more context for better advice.
Unless you need to access currently dispatched presenter (to be able to use this) recommended way would be to use LinkGenerator service and pass exact presenter.