Example #1
0
 /**
  * Initialization of render before Fetch() or Display()
  *
  * @param bool $bForce
  */
 protected function _initRender($bForce = false)
 {
     if ($this->bInitRender && !$bForce) {
         return;
     }
     $nTimer = microtime(true);
     E::ModuleHook()->Run('render_init_start', array('bLocal' => $this->bLocal));
     // If skin not initialized (or it was changed) then init one
     if ($this->sViewSkin != $this->GetConfigSkin()) {
         $this->_initSkin();
     } else {
         // Level could be changed after skin initialization
         Config::SetLevel(Config::LEVEL_SKIN_CUSTOM);
     }
     // init templator if not yet
     $this->_initTemplator();
     // Loads localized texts
     $aLang = E::ModuleLang()->GetLangMsg();
     // Old skin compatibility
     $aLang['registration_password_notice'] = E::ModuleLang()->Get('registration_password_notice', array('min' => C::Val('module.security.password_len', 3)));
     $this->Assign('aLang', $aLang);
     //$this->Assign('oLang', E::ModuleLang()->Dictionary());
     if (!$this->bLocal && !$this->GetResponseAjax()) {
         // Initialization of assets (JS-, CSS-files)
         $this->InitAssetFiles();
     }
     $oSkin = E::ModuleSkin()->GetSkin($this->sViewSkin);
     if (!$oSkin || !$oSkin->GetCompatible() || $oSkin->SkinCompatible('1.1', '<')) {
         // Для старых скинов загружаем объект доступа к конфигурации
         $this->Assign('oConfig', Config::getInstance());
     }
     E::ModuleHook()->Run('render_init_done', array('bLocal' => $this->bLocal));
     $this->bInitRender = true;
     self::$_preprocessTime += microtime(true) - $nTimer;
 }
Example #2
0
 /**
  * Initialization of render before Fetch() or Display()
  */
 protected function _initRender()
 {
     E::ModuleHook()->Run('render_init_start', array('bLocal' => $this->bLocal));
     // If skin not initialized (or it was changed) then init one
     if ($this->sViewSkin != $this->GetConfigSkin()) {
         $this->_initSkin($this->bLocal);
     } else {
         // Level could be changed after skin initialization
         Config::SetLevel(Config::LEVEL_SKIN);
     }
     // init templator if not yet
     $this->_initTemplator();
     // Loads localized texts
     $this->Assign('aLang', E::ModuleLang()->GetLangMsg());
     $this->Assign('oLang', E::ModuleLang()->Dictionary());
     if (!$this->bLocal && !$this->GetResponseAjax()) {
         // Initialization of assets (JS-, CSS-files)
         $this->InitAssetFiles();
     }
     E::ModuleHook()->Run('render_init_done', array('bLocal' => $this->bLocal));
 }