Created
March 15, 2009 20:55
-
-
Save henrikbjorn/79533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class JsModuleActionFilter extends sfFilter | |
{ | |
public function execute($filterChain) | |
{ | |
if ($this->isFirstCall()) { | |
$params = $this->getContext()->getRequest()->getRequestParameters(); | |
//gets a module action specific js file | |
$this->getContext()->getResponse()->addJavascript('modules/' . $params['module'] . '_' . $params['action'] , 'last'); | |
} | |
$filterChain->execute(); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment