Welcome Guest, Not a member yet? Register   Sign In
Loading helper before controller

(10-01-2020, 02:22 PM)InsiteFX Wrote: I think what you want there are controller filters.

Thanks. I didn't know that. Really helped me. <3

Helpers that I want globally available I generally load via the pre_system Event. See app/Config/Evebts.PHP
If you just need it for a specific controller or two the solution above is fine. I typically extend the initController event and add it there. If you could also call Controller::loadHelpers() from the constructor if you needed to handle things then.

Theme © iAndrew 2016 - Forum software by © MyBB