/**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilmdeditorgui':
             return parent::executeCommand();
             break;
         case "ilpageobjectgui":
             // "stys" was "sahs" before
             $page_gui = new ilPageObjectGUI("stys", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             $page_gui->setStyleId($this->getStyleId());
             $html = $ilCtrl->forwardCommand($page_gui);
             return $html;
         default:
             $html = parent::executeCommand();
             return $html;
     }
 }
 /**
  * list definitions
  */
 function listDefinitions()
 {
     global $ilTabs;
     $this->getTemplate();
     $this->displayLocator();
     $this->setTabs();
     $ilTabs->activateTab("definitions");
     require_once "./Services/COPage/classes/class.ilPageObjectGUI.php";
     // content style
     $this->tpl->setCurrentBlock("ContentStyle");
     $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
     $this->tpl->parseCurrentBlock();
     // syntax style
     $this->tpl->setCurrentBlock("SyntaxStyle");
     $this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $this->tpl->parseCurrentBlock();
     // load template for table
     $this->tpl->addBlockfile("ADM_CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
     //$this->tpl->addBlockfile("CONTENT", "def_list", "tpl.glossary_definition_list.html", true);
     //ilUtil::sendInfo();
     $this->tpl->addBlockfile("STATUSLINE", "statusline", "tpl.statusline.html");
     $this->tpl->setTitle($this->lng->txt("cont_term") . ": " . $this->term->getTerm());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_term_b.png"));
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setCurrentBlock("add_def");
     $this->tpl->setVariable("TXT_ADD_DEFINITION", $this->lng->txt("cont_add_definition"));
     $this->tpl->setVariable("BTN_ADD", "addDefinition");
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("def_list");
     $defs = ilGlossaryDefinition::getDefinitionList($_GET["term_id"]);
     $this->tpl->setVariable("TXT_TERM", $this->term->getTerm());
     for ($j = 0; $j < count($defs); $j++) {
         $def = $defs[$j];
         $page_gui = new ilPageObjectGUI("gdf", $def["id"]);
         $page_gui->setStyleId($this->glossary->getStyleSheetId());
         $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $_GET["ref_id"]);
         $page_gui->setTemplateOutput(false);
         $output = $page_gui->preview();
         if (count($defs) > 1) {
             $this->tpl->setCurrentBlock("definition_header");
             $this->tpl->setVariable("TXT_DEFINITION", $this->lng->txt("cont_definition") . " " . ($j + 1));
             $this->tpl->parseCurrentBlock();
         }
         if ($j > 0) {
             $this->tpl->setCurrentBlock("up");
             $this->tpl->setVariable("TXT_UP", $this->lng->txt("up"));
             $this->ctrl->setParameter($this, "def", $def["id"]);
             $this->tpl->setVariable("LINK_UP", $this->ctrl->getLinkTarget($this, "moveUp"));
             $this->tpl->parseCurrentBlock();
         }
         if ($j + 1 < count($defs)) {
             $this->tpl->setCurrentBlock("down");
             $this->tpl->setVariable("TXT_DOWN", $this->lng->txt("down"));
             $this->ctrl->setParameter($this, "def", $def["id"]);
             $this->tpl->setVariable("LINK_DOWN", $this->ctrl->getLinkTarget($this, "moveDown"));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("submit_btns");
         $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
         $this->ctrl->setParameter($this, "def", $def["id"]);
         $this->ctrl->setParameterByClass("ilTermDefinitionEditorGUI", "def", $def["id"]);
         $this->tpl->setVariable("LINK_EDIT", $this->ctrl->getLinkTargetByClass(array("ilTermDefinitionEditorGUI", "ilPageObjectGUI"), "edit"));
         $this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
         $this->tpl->setVariable("LINK_DELETE", $this->ctrl->getLinkTarget($this, "confirmDefinitionDeletion"));
         $this->tpl->parseCurrentBlock();
         $this->tpl->setCurrentBlock("definition");
         $this->tpl->setVariable("PAGE_CONTENT", $output);
         $this->tpl->parseCurrentBlock();
     }
     //$this->tpl->setCurrentBlock("def_list");
     //$this->tpl->parseCurrentBlock();
     $this->quickList();
 }
 /**
  * Get HTML of ILIAS login page editor
  * @return string html
  */
 protected function getLoginPageEditorHTML()
 {
     global $lng, $tpl;
     include_once './Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
     $lpe = ilAuthLoginPageEditorSettings::getInstance();
     $active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey());
     if (!$active_lang) {
         return '';
     }
     // if page does not exist, return nothing
     include_once './Services/COPage/classes/class.ilPageUtil.php';
     if (!ilPageUtil::_existsAndNotEmpty('auth', ilLanguage::lookupId($active_lang))) {
         return '';
     }
     include_once './Services/COPage/classes/class.ilPageObject.php';
     include_once './Services/COPage/classes/class.ilPageObjectGUI.php';
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     // get page object
     $page_gui = new ilPageObjectGUI('auth', ilLanguage::lookupId($active_lang));
     /*
     		include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
     		$page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
     			$this->object->getStyleSheetId(), $this->object->getType()));
     */
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $page_gui->setStyleId(0, 'auth');
     $page_gui->setIntLinkHelpDefault("RepositoryItem", $active_lang);
     //$page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this, "downloadFile"));
     //$page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
     //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
     //		$page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this, ""));
     $page_gui->setPresentationTitle("");
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     $page_gui->setEnabledRepositoryObjects(true);
     $page_gui->setEnabledLoginPage(true);
     $page_gui->setEnabledFileLists(false);
     $page_gui->setEnabledPCTabs(false);
     $page_gui->setEnabledMaps(true);
     $ret = $page_gui->showPage();
     return $ret;
 }