62        $this->lng = 
$DIC->language();
 
   63        $this->
user = $DIC->user();
 
   64        $ilCtrl = 
$DIC->ctrl();
 
   66        $this->ctrl = $ilCtrl;
 
   67        $this->
ui = $DIC->ui();
 
   78        $this->def_screen_id[$a_part] = $a_id;
 
  109        $this->screen_id_component = $a_comp;
 
  121        $comp = ($this->screen_id_component != 
"")
 
  122            ? $this->screen_id_component
 
  123            : $this->def_screen_id[self::ID_PART_COMPONENT];
 
  130            ? $this->screen_id[self::ID_PART_SCREEN]
 
  131            : $this->def_screen_id[self::ID_PART_SCREEN];
 
  134            ? $this->screen_id[self::ID_PART_SUB_SCREEN]
 
  135            : $this->def_screen_id[self::ID_PART_SUB_SCREEN];
 
  153        $this->help_sections[] = array(
"help_id" => $a_help_id, $a_level);
 
  166        include_once(
"./Services/Help/classes/class.ilHelpMapping.php");
 
  178        include_once(
"./Services/Help/classes/class.ilHelpMapping.php");
 
  198        $ilCtrl->setParameterByClass(
"ilhelpgui", 
"help_screen_id", $this->
getScreenId() . 
"." . 
$_GET[
"ref_id"]);
 
  207        $cmd = $this->ctrl->getCmd(
"showHelp");
 
  208        $next_class = $this->ctrl->getNextClass($this);
 
  210        switch ($next_class) {
 
  212                return $this->$cmd();
 
  223        $lng->loadLanguageModule(
"help");
 
  226        if (
$_GET[
"help_screen_id"] != 
"") {
 
  228            $help_screen_id = 
$_GET[
"help_screen_id"];
 
  237        $id_arr = explode(
".", $help_screen_id);
 
  238        include_once(
"./Services/Help/classes/class.ilHelpMapping.php");
 
  239        include_once(
"./Services/Help/classes/class.ilHelp.php");
 
  245            include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
 
  247            $acc->setId(
"oh_acc_" . $h_id);
 
  248            $acc->setUseSessionStorage(
true);
 
  251            foreach ($help_arr as $h_id) {
 
  252                include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
 
  259                include_once(
"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
 
  261                foreach ($pages as $pg) {
 
  266                        "return il.Help.showPage(" . $pg[
"child"] . 
");" 
  273            $h_tpl = 
new ilTemplate(
"tpl.help.html", 
true, 
true, 
"Services/Help");
 
  274            $h_tpl->setVariable(
"HEAD", 
$lng->txt(
"help"));
 
  276            $h_tpl->setCurrentBlock(
"search");
 
  277            include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  279            $h_tpl->setVariable(
"HELP_SEARCH_LABEL", $this->lng->txt(
"help_search_label"));
 
  280            $h_tpl->parseCurrentBlock();
 
  282            if (count($help_arr) > 0) {
 
  283                $h_tpl->setVariable(
"CONTENT", $acc->getHTML());
 
  285                $mess = 
$ui->factory()->messageBox()->info(
$lng->txt(
"help_no_content"));
 
  286                $h_tpl->setVariable(
"CONTENT", 
$ui->renderer()->render([$mess]));
 
  289            include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  307        $page_id = (int) 
$_GET[
"help_page"];
 
  309        $h_tpl = 
new ilTemplate(
"tpl.help.html", 
true, 
true, 
"Services/Help");
 
  310        include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
 
  314            $back_button = 
$ui->factory()->button()->bulky(
$ui->factory()->symbol()->glyph()->back(), 
$lng->txt(
"back"), 
"#")->withOnLoadCode(
function ($id) use ($t) {
 
  318            $h_tpl->setVariable(
"BACKBUTTON", 
$ui->renderer()->renderAsync($back_button));
 
  320            $back_button = 
$ui->factory()->button()->bulky(
$ui->factory()->symbol()->glyph()->back(), 
$lng->txt(
"back"), 
"#")->
withOnLoadCode(
function ($id) {
 
  322                    "$(\"#$id\").click(function() { return il.Help.listHelp(event, true); return false;});";
 
  324            $h_tpl->setVariable(
"BACKBUTTON", 
$ui->renderer()->renderAsync($back_button));
 
  332        include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
 
  336        include_once(
"./Services/COPage/classes/class.ilPageObject.php");
 
  337        include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
 
  340        include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
  341        include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
  343        $cfg = $page_gui->getPageConfig();
 
  344        $page_gui->setPresentationTitle(
"");
 
  345        $page_gui->setTemplateOutput(
false);
 
  346        $page_gui->setHeader(
"");
 
  347        $page_gui->setRawPageContent(
true);
 
  348        $cfg->setEnablePCType(
"Map", 
false);
 
  349        $cfg->setEnablePCType(
"Tabs", 
false);
 
  350        $cfg->setEnablePCType(
"FileList", 
false);
 
  352        $page_gui->getPageObject()->buildDom();
 
  353        $int_links = $page_gui->getPageObject()->getInternalLinks();
 
  357        $page_gui->setLinkXML($link_xml);
 
  361        $h_tpl->setVariable(
"CONTENT", 
$ret);
 
  362        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  367        $page = $h_tpl->get();
 
  398        include_once(
"./Services/Help/classes/class.ilHelp.php");
 
  399        if ($this->screen_id_component != 
"") {
 
  421        $a_tpl->addJavascript(
"./Services/Help/js/ilHelp.js");
 
  422        $a_tpl->addJavascript(
"./Services/Accordion/js/accordion.js");
 
  424        $a_tpl->addJavascript(
"./Services/COPage/js/ilCOPagePres.js");
 
  427        $a_tpl->addOnLoadCode(
 
  428            "il.Help.setAjaxUrl('" .
 
  429            $ctrl->getLinkTargetByClass(
"ilhelpgui", 
"", 
"", 
true)
 
  434        $module_id = (int) 
$ilSetting->get(
"help_module");
 
  436        if ((OH_REF_ID > 0 || $module_id > 0) && 
$ilUser->getLanguage() == 
"de") {
 
  438                $a_tpl->addOnLoadCode(
"il.Help.showCurrentPage(" . 
ilSession::get(
"help_pg") . 
");", 3);
 
  440                $a_tpl->addOnLoadCode(
"il.Help.listHelp(null);", 3);
 
  444            if (
$ilUser->getPref(
"hide_help_tt")) {
 
  445                $a_tpl->addOnLoadCode(
"if (il && il.Help) {il.Help.switchTooltips();}", 3);
 
  470        $ilUser->writePref(
"hide_help_tt", 
"1");
 
  483        $ilUser->writePref(
"hide_help_tt", 
"0");
 
  493        $link_info = 
"<IntLinkInfos>";
 
  494        foreach ($a_int_links as $int_link) {
 
  495            $target = $int_link[
"Target"];
 
  496            if (substr($target, 0, 4) == 
"il__") {
 
  499                $type = $int_link[
"Type"];
 
  500                $targetframe = 
"None";
 
  503                $anc = $anc_add = 
"";
 
  504                if ($int_link[
"Anchor"] != 
"") {
 
  505                    $anc = $int_link[
"Anchor"];
 
  506                    $anc_add = 
"_" . rawurlencode($int_link[
"Anchor"]);
 
  511                    case "StructureObject":
 
  512                            if (
$type == 
"PageObject") {
 
  521                $link_info .= 
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " .
 
  522                    "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"\" Anchor=\"\"/>";
 
  525        $link_info .= 
"</IntLinkInfos>";
 
  535        $link_info = 
"<LinkTargets>";
 
  536        $link_info .= 
"<LinkTarget TargetFrame=\"None\" LinkTarget=\"\" OnClick=\"return il.Help.openLink(event);\" />";
 
  537        $link_info .= 
"</LinkTargets>";
 
  552        $term = 
$_GET[
"term"];
 
  560        $h_tpl = 
new ilTemplate(
"tpl.help.html", 
true, 
true, 
"Services/Help");
 
  561        include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
 
  564        $back_button = 
$ui->factory()->button()->bulky(
$ui->factory()->symbol()->glyph()->back(), 
$lng->txt(
"back"), 
"#")->withOnLoadCode(
function ($id) {
 
  566                "$(\"#$id\").click(function() { return il.Help.listHelp(event, true); return false;});";
 
  568        $h_tpl->setVariable(
"BACKBUTTON", 
$ui->renderer()->renderAsync($back_button));
 
  570        $h_tpl->setVariable(
"HEAD", 
$lng->txt(
"help") . 
" - " .
 
  571            $lng->txt(
"search_result"));
 
  573        $h_tpl->setCurrentBlock(
"search");
 
  574        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  576        $h_tpl->setVariable(
"HELP_SEARCH_LABEL", $this->lng->txt(
"help_search_label"));
 
  578        $h_tpl->parseCurrentBlock();
 
  580        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  584        include_once(
"./Services/Search/classes/class.ilRepositoryObjectDetailSearch.php");
 
  586        $s->setQueryString($term);
 
  589        include_once(
"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
 
  591        foreach (
$result->getResults() as $r) {
 
  596                "return il.Help.showPage(" . $r[
"item_id"] . 
");" 
  599        $h_tpl->setVariable(
"CONTENT", $grp_list->getHTML());
 
  622        $mmc = 
$DIC->globalScreen()->collector()->mainmenu();
 
  623        if ($this->raw_menu_items == 
null) {
 
  625            $this->raw_menu_items = iterator_to_array($mmc->getRawItems());
 
  628        foreach ($this->raw_menu_items as $item) {
 
  629            if ($item instanceof Item\
LinkList) {
 
  630                foreach ($item->getLinks() as $link) {
 
  648        $mmc = 
$DIC->globalScreen()->collector()->mainmenu();
 
  650        $id = $item->getProviderIdentification()->getInternalIdentifier();
 
  651        $ws = 
"[ \t\r\f\v\n]*";
 
  654        while (preg_match(
"~\[(menu" . $ws . 
"path$ws=$ws(\"$id\")$ws)/\]~i", $content, $found)) {
 
  656            if ($item instanceof \
ILIAS\GlobalScreen\Scope\MainMenu\Factory\
isChild) {
 
  657                $parent = $mmc->getItemInformation()->getParent($item);
 
  658                if ($parent !== 
null) {
 
  659                    $parent = $mmc->getSingleItemFromRaw($parent);
 
  664            $content = preg_replace(
 
  665                '~\[' . $found[1] . 
'/\]~i',
 
  666                "<strong>" . $path . 
"</strong>",
 
  671        while (preg_match(
"~\[(menu" . $ws . 
"item$ws=$ws(\"$id\")$ws)/\]~i", $content, $found)) {
 
  672            $content = preg_replace(
 
  673                '~\[' . $found[1] . 
'/\]~i',
 
  690        $mmc = 
$DIC->globalScreen()->collector()->mainmenu();
 
  691        return $mmc->getItemInformation()->customTranslationForUser($item)->getTitle();
 
An exception for terminatinating execution or to throw for unit testing.
Accordion user interface class.
static get($a_glyph, $a_text="")
Get glyph html.
hasSections()
Has sections?
isHelpPageActive()
Is help page active?
addHelpSection($a_help_id, $a_level=1)
Add help section.
getLinkXML($a_int_links)
get xml for links
showHelp()
Show online help.
initHelp($a_tpl, $ajax_url)
Render current help page.
getHelpSections()
Get help sections.
getTabTooltipText($a_tab_id)
Get tab tooltip text.
getTitleForItem(\ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem $item)
Get title for item.
getLinkTargetsXML()
Get XMl for Link Targets.
setDefaultScreenId($a_part, $a_id)
Set default screen id.
replaceItemTag($mmc, string $content, \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem $item)
Replace item tag.
setCtrlPar()
Get help section url parameter.
deactivateTooltips()
Deactivate tooltips.
executeCommand()
execute command
getScreenId()
Get screen id.
replaceMenuItemTags(string $content)
Help page post processing.
resetCurrentPage()
Hide help.
setSubScreenId($a_id)
Set sub screen id.
setScreenId($a_id)
Set screen id.
activateTooltips()
Activate tooltips.
setScreenIdComponent($a_comp)
Set screen id component.
static hasScreenIdSections($a_screen_id)
Has given screen Id any sections?
static getHelpSectionsForId($a_screen_id, $a_ref_id)
Get help sections for screen id.
static getTooltipPresentationText($a_tt_id)
Get tooltip for id.
static getHelpLMId()
Get help lm id.
static getPagesOfChapter($a_lm_id, $a_chap_id)
Get pages of chapter.
static _lookupTitle($a_obj_id)
Lookup title.
static _exists($a_id)
checks wether a lm content object with specified id exists or not
Extension of ilPageObjectGUI for learning modules.
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
static set($a_var, $a_val)
Set a value.
static clear($a_var)
Unset a value.
static get($a_var)
Get a value.
special template class to simplify handling of ITX/PEAR
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initMaphilight()
Inits and add maphilight to the general template.
withOnLoadCode(\Closure $binder)
Class ChatMainBarProvider \MainMenu\Provider.