Loading 'all' helpers is inefficient. If there are helpers that you will be using widely, load them app_controller as gedex says. From thereonin, apply some thought to what helpers you need in individual controllers and add them there.
Don't forget that as soon as you create a $helpers var you are overriding the defaults previous set, so you'll need to add back in Html, Form etc. You can do var $helpers[] = 'MyHelper' which appends it to the existing array, but I am not sure how valid/legitimate that is. No doubt someone will shout at me if I am wrong! Jeremy Burns Class Outfit [email protected] http://www.classoutfit.com On 10 Dec 2010, at 03:13, Akeda Bagus wrote: > On Fri, Dec 10, 2010 at 9:42 AM, Shinya Koizumi <[email protected]> wrote: >> I am not big fan of this add helper class name to array to enable it. >> Is there anyway to enable all helper classes or some of helper classes >> loaded automatically or >> some of helper classess should be core so they don't have to enable them >> when using them? >> >> For classes like this, i want to use as static class so that you can >> Time::niceShort(). But it's just me. > > By default controller loads the Session, Html, and Form helpers. If > you want to load all helpers, > it might be suitable if you load it on AppController. > > > -- > regards, > gedex > > blog: http://gedex.web.id > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
