/** * dispatchLoopStartup * * @param Zend_Controller_Request_Abstract $oRequest * @return void */ public function dispatchLoopStartup(Zend_Controller_Request_Abstract $oRequest) { // Hack DOJO Zend_Dojo_View_Helper_Dojo::setUseDeclarative(); $contextSwitch = Zend_Controller_Action_HelperBroker::getStaticHelper('ContextSwitch'); $contextParam = $contextSwitch->getContextParam(); $format = $oRequest->getParam($contextParam); // Inject javascript vars if (!$format or $format == "html" or $format == "html-json" or $format == "html-xml") { $this->_view->dojo()->setDjConfigOption('ZlBaseUrl', $this->_view->baseUrl()); $this->_view->dojo()->setDjConfigOption('ZlBaseThemeUrl', $this->_view->baseThemeUrl()); $this->_view->dojo()->setDjConfigOption('ZlModule', $oRequest->getModuleName()); $this->_view->dojo()->setDjConfigOption('ZlController', $oRequest->getControllerName()); $this->_view->dojo()->setDjConfigOption('ZlAction', $oRequest->getActionName()); } }