Ejemplo n.º 1
0
 public function render()
 {
     $this->preRender();
     $oTemplate = null;
     if (!Session::getSession()->isAuthenticated() || !Session::getSession()->getUser()->getIsBackendLoginEnabled()) {
         if (Session::getSession()->isAuthenticated() && !Session::getSession()->getUser()->getIsBackendLoginEnabled()) {
             Flash::getFlash()->addMessage('admin_login_denied');
             Session::getSession()->logout();
         }
         self::setContentLanguage(Session::language());
         $oTemplate = new Template('login', array(DIRNAME_TEMPLATES, 'admin'), false, true);
         $oLoginWindowWidget = new LoginWindowWidgetModule();
         LoginWindowWidgetModule::includeResources();
     } else {
         $oTemplate = new Template('main', array(DIRNAME_TEMPLATES, 'admin'), false, true);
         $this->renderAdmin($oTemplate);
     }
     $oTemplate->replaceIdentifier("title", Settings::getSetting('admin', 'title', 'no title set in config/config.yml for admin'), null, Template::LEAVE_IDENTIFIERS);
     $oTemplate->replaceIdentifier('module_name', $this->sModuleName);
     $oTemplate->replaceIdentifier('module_display_name', AdminModule::getDisplayNameByName($this->sModuleName));
     $oTemplate->render();
 }