Skip to content

Instantly share code, notes, and snippets.

@jeremyb
Created November 3, 2010 13:10
Show Gist options
  • Save jeremyb/661052 to your computer and use it in GitHub Desktop.
Save jeremyb/661052 to your computer and use it in GitHub Desktop.
public function configure()
{
$this->dispatcher->connect('context.load_factories', array($this, 'listenToContextLoadFactoriesEvent'));
}
public function listenToContextLoadFactoriesEvent(sfEvent $event)
{
$event->getSubject()->getResponse()->addJavascript($event->getSubject()->getRouting()->generate('javascript_configs'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment