XF 2.0 Use route parameters in controller init()

S Thomas

Well-known member
I want to use the route parameters (which are typically stored in $params in the controller action methods) in the init() method. Since this is not an action method, it does not inherit those parameters. Is there still any way to obtain the route parameters?
//
Got it:
PHP:
$this->router()->routeToController($this->request()->getRoutePath()))->getParams()
 
Last edited:
Back
Top Bottom