How to load helpers in model class

In the class, add this:

$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', true);
$context = sfContext::createInstance($configuration);
$configuration->loadHelpers('url', 'Partial');

then try to call the helplers

posted @ 2011-09-26 17:19  Lux.Y  阅读(287)  评论(0)    收藏  举报