Just quick post today about loading helpers in symfony 1.2 from an action or model.
Previously I would use the sfLoader class to load a helper, but it now says:
The sfLoader::loadHelpers() method is deprecated. Please use the same method from sfApplicationConfiguration.
So, from the action you should now use:
$this->getContext()->getConfiguration()->loadHelpers('Url');
From the model you can use:
sfContext::getInstance()->getConfiguration()->loadHelpers('Url');
Comments
Leave a comment Trackback