protected function _beforeRoute($fw, $args = null) { AbstractController::_beforeRoute($fw, $args); $this->_viewInstance = View::instance(); $this->setPageTitle($this->__('WebHomeBank')); Design::instance()->addJs('jquery/jquery-2.1.4.min.js', 'header', -100)->addJs('whb/i18n.js')->addInlineJs("var LANGUAGE='{$fw->get('LANGUAGE')}';\nvar CURRENCY='{$this->getXhbSession()->getCurrencyCode()}';\nvar i18n = new I18n(LANGUAGE, CURRENCY);"); $this->canCacheOutput(false); $this->_setupLayoutBlocks(); }
protected function _beforeRoute($fw, $args = null) { parent::_beforeRoute($fw, $args); $this->_viewInstance = View::instance(); if (!$this->getXhbSession()->isModelLoaded()) { $this->_reroute('/init/load'); return false; } $xhb = $this->getXhbSession()->getModel(); $this->setPageTitle($xhb->getTitle()); Design::instance()->addJs('jquery/jquery-2.1.4.min.js', 'header', -100)->addJs('whb/i18n.js')->addInlineJs("var LANGUAGE='{$fw->get('LANGUAGE')}';\nvar CURRENCY='{$this->getXhbSession()->getCurrencyCode()}';\nvar i18n = new I18n(LANGUAGE, CURRENCY);"); $this->_setupLayoutBlocks(); }