public function init() { // init view if (null === $this->view) { $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); if (null === $viewRenderer->view) { $viewRenderer->initView(); } $this->view = clone $viewRenderer->view; $this->view->clearVars(); } }
/** * Constructor */ public function __construct($name, $context, $config) { // init view if (null === $this->view) { $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); if (null === $viewRenderer->view) { $viewRenderer->initView(); } $this->view = clone $viewRenderer->view; $this->view->clearVars(); } $this->_templateSuffix = '.' . ltrim($this->_templateSuffix, '.'); $this->_owApp = OntoWiki::getInstance(); $this->_erfurt = $this->_owApp->erfurt; $this->_store = $this->_erfurt->getStore(); $this->_config = $this->_owApp->config; $this->_lang = $this->_config->languages->locale; $this->_request = Zend_Controller_Front::getInstance()->getRequest(); $this->_name = $name; // set important script variables $this->view->themeUrlBase = $this->_config->themeUrlBase; $this->view->urlBase = $this->_config->urlBase; $this->view->moduleUrl = $this->_config->staticUrlBase . $this->_config->extensions->base . $config->extensionName . '/'; // set the config $this->_privateConfig = $config->private; // set the context $this->setContext($context); // allow custom module initialization $this->init(); }
public function preDispatch() { $this->view->clearVars(); }