ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilHelpGUI Class Reference

Help GUI class. More...

+ Inheritance diagram for ilHelpGUI:
+ Collaboration diagram for ilHelpGUI:

Public Member Functions

 __construct ()
 
 setDefaultScreenId (string $a_part, string $a_id)
 
 setScreenId (string $a_id)
 
 setSubScreenId (string $a_id)
 
 setScreenIdComponent (string $a_comp)
 
 getScreenId ()
 
 addHelpSection (string $a_help_id, int $a_level=1)
 
 hasSections ()
 
 getHelpSections ()
 
 setCtrlPar ()
 
 executeCommand ()
 
 showHelp ()
 
 showPage ()
 
 resetCurrentPage ()
 
 getTabTooltipText (string $a_tab_id)
 
 registerTabLink (string $tab_id, \ILIAS\UI\Component\Link\Standard $link)
 
 initHelp (ilGlobalTemplateInterface $a_tpl, string $ajax_url)
 
 isHelpPageActive ()
 
 deactivateTooltips ()
 
 activateTooltips ()
 
 getLinkXML (array $a_int_links)
 
 getLinkTargetsXML ()
 Get XMl for Link Targets. More...
 
 search ()
 
 showTooltips ()
 
 isHelpActive ()
 
 areTooltipsActive ()
 
 if (is_null(self::$internal_service))
 temporary move it here until DIC holds help service instead of ilHelpGUI More...
 

Data Fields

const ID_PART_SCREEN = "screen"
 
const ID_PART_SUB_SCREEN = "sub_screen"
 
const ID_PART_COMPONENT = "component"
 
array $help_sections = array()
 
array $def_screen_id = array()
 
array $screen_id = array()
 

Protected Member Functions

 initUI ()
 
 symbol ()
 
 replaceMenuItemTags (string $content)
 
 replaceItemTag (string $content, \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem $item)
 

Protected Attributes

HelpScreenIdObserver $observer
 
ILIAS Repository InternalGUIService $gui
 
ILIAS Help Presentation PresentationManager $presentation
 
ILIAS Help Map MapManager $help_map
 
StandardGUIRequest $help_request
 
ilCtrl $ctrl
 
ilSetting $settings
 
ilLanguage $lng
 
ilObjUser $user
 
string $screen_id_component = ''
 
ILIAS DI UIServices $ui
 
array $raw_menu_items = null
 

Static Protected Attributes

static ILIAS Help InternalService $internal_service = null
 

Detailed Description

Help GUI class.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilHelpGUI: ilLMPageGUI

Definition at line 28 of file class.ilHelpGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilHelpGUI::__construct ( )

Definition at line 51 of file class.ilHelpGUI.php.

52 {
53 global $DIC;
54
55 $domain = $this->internal()->domain();
56
57 $this->settings = $domain->settings();
58 $this->lng = $domain->lng();
59 $this->user = $domain->user();
60
61 $this->help_map = $domain->map();
62 $this->presentation = $domain->presentation();
63
64 if (!isset($DIC['help.screen_id_collector'])) {
65 $DIC['help.screen_id_collector'] = function () use ($DIC) {
66 return new HelpScreenIdObserver();
67 };
68 }
69 $DIC->ctrl()->attachObserver($DIC['help.screen_id_collector']);
70 $this->observer = $DIC['help.screen_id_collector'];
71 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ activateTooltips()

ilHelpGUI::activateTooltips ( )

Definition at line 367 of file class.ilHelpGUI.php.

367 : void
368 {
369 $ilUser = $this->user;
370
371 $ilUser->writePref("hide_help_tt", "0");
372 }
ilObjUser $user
writePref(string $key, string $value)

◆ addHelpSection()

ilHelpGUI::addHelpSection ( string  $a_help_id,
int  $a_level = 1 
)

Definition at line 136 of file class.ilHelpGUI.php.

139 : void {
140 $this->help_sections[] = array("help_id" => $a_help_id, $a_level);
141 }

◆ areTooltipsActive()

ilHelpGUI::areTooltipsActive ( )

Definition at line 568 of file class.ilHelpGUI.php.

568 : bool
569 {
570 return $this->internal()->domain()->module()->areTooltipsActive();
571 }

◆ deactivateTooltips()

ilHelpGUI::deactivateTooltips ( )

Definition at line 360 of file class.ilHelpGUI.php.

360 : void
361 {
362 $ilUser = $this->user;
363
364 $ilUser->writePref("hide_help_tt", "1");
365 }

◆ executeCommand()

ilHelpGUI::executeCommand ( )

Definition at line 163 of file class.ilHelpGUI.php.

163 : string
164 {
165 $this->initUI();
166 $cmd = $this->ctrl->getCmd("showHelp") ?: "showHelp";
167 return (string) $this->$cmd();
168 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getHelpSections()

ilHelpGUI::getHelpSections ( )

Definition at line 148 of file class.ilHelpGUI.php.

148 : array
149 {
150 return $this->help_map->getHelpSectionsForId(
151 $this->getScreenId(),
152 $this->help_request->getRefId()
153 );
154 }

◆ getLinkTargetsXML()

ilHelpGUI::getLinkTargetsXML ( )

Get XMl for Link Targets.

Definition at line 417 of file class.ilHelpGUI.php.

417 : string
418 {
419 $link_info = "<LinkTargets>";
420 $link_info .= "<LinkTarget TargetFrame=\"None\" LinkTarget=\"\" OnClick=\"return il.Help.openLink(event);\" />";
421 $link_info .= "</LinkTargets>";
422 return $link_info;
423 }

◆ getLinkXML()

ilHelpGUI::getLinkXML ( array  $a_int_links)

Definition at line 374 of file class.ilHelpGUI.php.

376 : string {
377 $href = "";
378 $link_info = "<IntLinkInfos>";
379 foreach ($a_int_links as $int_link) {
380 $target = $int_link["Target"];
381 if (strpos($target, "il__") === 0) {
382 $target_arr = explode("_", $target);
383 $target_id = $target_arr[count($target_arr) - 1];
384 $type = $int_link["Type"];
385 $targetframe = "None";
386
387 // anchor
388 $anc = $anc_add = "";
389 if (($int_link["Anchor"] ?? "") != "") {
390 $anc = $int_link["Anchor"];
391 $anc_add = "_" . rawurlencode($int_link["Anchor"]);
392 }
393
394 switch ($type) {
395 case "PageObject":
396 case "StructureObject":
397 if ($type === "PageObject") {
398 $href = "#pg_" . $target_id;
399 } else {
400 $href = "#";
401 }
402 break;
403 }
404
405 $link_info .= "<IntLinkInfo Target=\"$target\" Type=\"$type\" " .
406 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"\" Anchor=\"\"/>";
407 }
408 }
409 $link_info .= "</IntLinkInfos>";
410
411 return $link_info;
412 }

◆ getScreenId()

ilHelpGUI::getScreenId ( )

Definition at line 109 of file class.ilHelpGUI.php.

109 : string
110 {
111 return $this->observer->getScreenId();
112
113 $comp = ($this->screen_id_component != "")
114 ? $this->screen_id_component
115 : ($this->def_screen_id[self::ID_PART_COMPONENT] ?? '');
116
117 if ($comp == "") {
118 return "";
119 }
120
121 $scr_id = (isset($this->screen_id[self::ID_PART_SCREEN]) && $this->screen_id[self::ID_PART_SCREEN] != "")
122 ? $this->screen_id[self::ID_PART_SCREEN]
123 : ($this->def_screen_id[self::ID_PART_SCREEN] ?? '');
124
125 $sub_scr_id = (isset($this->screen_id[self::ID_PART_SUB_SCREEN]) && $this->screen_id[self::ID_PART_SUB_SCREEN] != "")
126 ? $this->screen_id[self::ID_PART_SUB_SCREEN]
127 : ($this->def_screen_id[self::ID_PART_SUB_SCREEN] ?? '');
128
129 $screen_id = $comp . "/" .
130 $scr_id . "/" .
131 $sub_scr_id;
132
133 return $screen_id;
134 }
array $screen_id
const ID_PART_SCREEN
const ID_PART_SUB_SCREEN

◆ getTabTooltipText()

ilHelpGUI::getTabTooltipText ( string  $a_tab_id)

Definition at line 308 of file class.ilHelpGUI.php.

308 : string
309 {
310 if ($this->screen_id_component != "") {
311 return $this->internal()->domain()->tooltips()->getTooltipPresentationText($this->screen_id_component . "_" . $a_tab_id);
312 }
313 return "";
314 }

◆ hasSections()

ilHelpGUI::hasSections ( )

Definition at line 143 of file class.ilHelpGUI.php.

143 : bool
144 {
145 return $this->help_map->hasScreenIdSections($this->getScreenId());
146 }

◆ if()

ilHelpGUI::if ( is_null(self::$internal_service)  )

temporary move it here until DIC holds help service instead of ilHelpGUI

Definition at line 580 of file class.ilHelpGUI.php.

580 {
581 self::$internal_service = new \ILIAS\Help\InternalService(
582 $DIC
583 );
584 }

References $DIC.

◆ initHelp()

ilHelpGUI::initHelp ( ilGlobalTemplateInterface  $a_tpl,
string  $ajax_url 
)

Definition at line 323 of file class.ilHelpGUI.php.

326 : void {
327 global $DIC;
328
329 $this->initUI();
330 $ilUser = $DIC->user();
331 $ilSetting = $DIC->settings();
332 $ctrl = $DIC->ctrl();
333
334 $a_tpl->addJavaScript("assets/js/ilHelp.js");
335 $a_tpl->addJavaScript("assets/js/accordion.js");
336 $a_tpl->addJavaScript("components/ILIAS/COPage/js/ilCOPagePres.js");
337
338 $this->setCtrlPar();
339 $a_tpl->addOnLoadCode(
340 "il.Help.setAjaxUrl('" .
341 $ctrl->getLinkTargetByClass("ilhelpgui", "", "", true)
342 . "');"
343 );
344
345
346 if ($this->presentation->isHelpActive()) {
347 if (ilSession::get("help_pg") > 0) {
348 $a_tpl->addOnLoadCode("il.Help.showCurrentPage(" . ilSession::get("help_pg") . ");", 3);
349 } else {
350 $a_tpl->addOnLoadCode("il.Help.listHelp(null);", 3);
351 }
352 }
353 }
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
static get(string $a_var)
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
global $ilSetting
Definition: privfeed.php:31

◆ initUI()

ilHelpGUI::initUI ( )
protected

Definition at line 73 of file class.ilHelpGUI.php.

73 : void
74 {
75 $this->ui = $this->internal()->gui()->ui();
76 $gui = $this->internal()->gui();
77 $this->ctrl = $gui->ctrl();
78 $this->help_request = $gui->standardRequest();
79 }
ILIAS Repository InternalGUIService $gui

References $gui, ILIAS\Repository\ctrl(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ isHelpActive()

ilHelpGUI::isHelpActive ( )

Definition at line 563 of file class.ilHelpGUI.php.

563 : bool
564 {
565 return $this->internal()->domain()->module()->isHelpActive();
566 }

◆ isHelpPageActive()

ilHelpGUI::isHelpPageActive ( )

Definition at line 355 of file class.ilHelpGUI.php.

355 : bool
356 {
357 return (ilSession::get("help_pg") > 0);
358 }

References ilSession\get().

+ Here is the call graph for this function:

◆ registerTabLink()

ilHelpGUI::registerTabLink ( string  $tab_id,
\ILIAS\UI\Component\Link\Standard  $link 
)

Definition at line 316 of file class.ilHelpGUI.php.

317 {
318 $tab_id = $this->screen_id_component . "_" . $tab_id;
319 return $this->internal()->gui()->guidedTour()->guidedTourGUI()
320 ->registerTabLink($tab_id, $link);
321 }

◆ replaceItemTag()

ilHelpGUI::replaceItemTag ( string  $content,
\ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem  $item 
)
protected

Definition at line 505 of file class.ilHelpGUI.php.

508 : string {
509 global $DIC;
510 $mmc = $DIC->globalScreen()->collector()->mainmenu();
511
512 $id = $item->getProviderIdentification()->getInternalIdentifier();
513 $ws = "[ \t\r\f\v\n]*";
514
515 // menu item path
516 while (preg_match("~\[(menu" . $ws . "path$ws=$ws(\"$id\")$ws)/\]~i", $content, $found)) {
517 $path = "";
518 if ($item instanceof \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isChild) {
519 $parent = $mmc->getItemInformation()->getParent($item);
520 if ($parent !== null) {
521 $parent = $mmc->getSingleItemFromRaw($parent);
522 $path = $this->getTitleForItem($parent) . " > ";
523 }
524 }
525 $path .= $this->getTitleForItem($item);
526 $content = preg_replace(
527 '~\[' . $found[1] . '/\]~i',
528 "<strong>" . $path . "</strong>",
529 $content
530 );
531 }
532 // menu item
533 while (preg_match("~\[(menu" . $ws . "item$ws=$ws(\"$id\")$ws)/\]~i", $content, $found)) {
534 $content = preg_replace(
535 '~\[' . $found[1] . '/\]~i',
536 "<strong>" . $this->getTitleForItem($item) . "</strong>",
537 $content
538 );
539 }
540 return $content;
541 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$path
Definition: ltiservices.php:30
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References $path.

◆ replaceMenuItemTags()

ilHelpGUI::replaceMenuItemTags ( string  $content)
protected

Definition at line 483 of file class.ilHelpGUI.php.

485 : string {
486 global $DIC;
487
488 $mmc = $DIC->globalScreen()->collector()->mainmenu();
489 if ($this->raw_menu_items == null) {
490 $mmc->collectOnce();
491 $this->raw_menu_items = iterator_to_array($mmc->getRawItems());
492 }
493
494 foreach ($this->raw_menu_items as $item) {
495 if ($item instanceof Item\LinkList) {
496 foreach ($item->getLinks() as $link) {
497 $content = $this->replaceItemTag($content, $link);
498 }
499 }
500 $content = $this->replaceItemTag($content, $item);
501 }
502 return $content;
503 }
replaceItemTag(string $content, \ILIAS\GlobalScreen\Scope\MainMenu\Factory\isItem $item)

◆ resetCurrentPage()

ilHelpGUI::resetCurrentPage ( )

Definition at line 303 of file class.ilHelpGUI.php.

303 : void
304 {
305 ilSession::clear("help_pg");
306 }
static clear(string $a_var)

References ilSession\clear().

+ Here is the call graph for this function:

◆ search()

ilHelpGUI::search ( )

Definition at line 425 of file class.ilHelpGUI.php.

425 : void
426 {
428 $ui = $this->ui;
429
430 $term = $this->help_request->getTerm();
431
432 if ($term === "") {
433 $term = ilSession::get("help_search_term");
434 }
435
436 $this->resetCurrentPage();
437
438 $h_tpl = new ilTemplate("tpl.help.html", true, true, "components/ILIAS/Help");
439
440 $back_button = $ui->factory()->button()->bulky($ui->factory()->symbol()->glyph()->back(), $lng->txt("back"), "#")->withOnLoadCode(function ($id) {
441 return
442 "$(\"#$id\").click(function() { return il.Help.listHelp(event, true); return false;});";
443 });
444 $h_tpl->setVariable("BACKBUTTON", $ui->renderer()->renderAsync($back_button));
445
446 $h_tpl->setVariable("HEAD", $lng->txt("help") . " - " .
447 $lng->txt("search_result"));
448
449 $h_tpl->setCurrentBlock("search");
450 $h_tpl->setVariable("GL_SEARCH", $this->symbol()->glyph("search")->render());
451 $h_tpl->setVariable("HELP_SEARCH_LABEL", $this->lng->txt("help_search_label"));
452 $h_tpl->setVariable("VAL_SEARCH", ilLegacyFormElementsUtil::prepareFormOutput($term));
453 $h_tpl->parseCurrentBlock();
454
455 $h_tpl->setVariable("CLOSE_IMG", $this->symbol()->glyph("close")->render());
456
457 $items = [];
458 $module = $this->internal()->domain()->module();
459 foreach ($module->getActiveModules() as $module_id) {
460 $lm_id = $module->lookupModuleLmId($module_id);
461 $s = new ilRepositoryObjectDetailSearch($lm_id);
462 $s->setQueryString($term);
463 $result = $s->performSearch();
464 foreach ($result->getResults() as $r) {
465 $items[] = $this->ui->factory()->button()->shy(
466 ilLMObject::_lookupTitle($r["item_id"]),
467 "#"
468 )->withOnLoadCode(function ($id) use ($r) {
469 return "document.getElementById('$id').addEventListener('click', () => {return il.Help.showPage(" . $r["item_id"] . ");})";
470 });
471 }
472 }
473
474 $list = $this->ui->factory()->listing()->unordered($items);
475 $h_tpl->setVariable("CONTENT", $this->ui->renderer()->renderAsync($list));
476
477 ilSession::set("help_search_term", $term);
478
479 echo $h_tpl->get();
480 exit;
481 }
ilLanguage $lng
ILIAS DI UIServices $ui
static _lookupTitle(int $a_obj_id)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static prepareFormOutput($a_str, bool $a_strip=false)
static set(string $a_var, $a_val)
Set a value.
special template class to simplify handling of ITX/PEAR
exit

References $id, $lng, ilLMObject\_lookupTitle(), exit, ilSession\get(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), ilSession\set(), ILIAS\Repository\symbol(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ setCtrlPar()

ilHelpGUI::setCtrlPar ( )

Definition at line 156 of file class.ilHelpGUI.php.

156 : void
157 {
158 $ilCtrl = $this->ctrl;
159 $refId = (string) $this->help_request->getRefId();
160 $ilCtrl->setParameterByClass("ilhelpgui", "help_screen_id", $this->getScreenId() . "." . $refId);
161 }
$refId
Definition: xapitoken.php:56

References $refId.

◆ setDefaultScreenId()

ilHelpGUI::setDefaultScreenId ( string  $a_part,
string  $a_id 
)

Definition at line 87 of file class.ilHelpGUI.php.

90 : void {
91 $this->def_screen_id[$a_part] = $a_id;
92 }

◆ setScreenId()

ilHelpGUI::setScreenId ( string  $a_id)

Definition at line 94 of file class.ilHelpGUI.php.

94 : void
95 {
96 $this->screen_id[self::ID_PART_SCREEN] = $a_id;
97 }

◆ setScreenIdComponent()

◆ setSubScreenId()

ilHelpGUI::setSubScreenId ( string  $a_id)

Definition at line 99 of file class.ilHelpGUI.php.

99 : void
100 {
101 $this->screen_id[self::ID_PART_SUB_SCREEN] = $a_id;
102 }

◆ showHelp()

ilHelpGUI::showHelp ( )

Definition at line 170 of file class.ilHelpGUI.php.

170 : void
171 {
173 $lng->loadLanguageModule("help");
174 $ui = $this->ui;
175 if ($this->help_request->getHelpScreenId() !== "") {
176 ilSession::set("help_screen_id", $this->help_request->getHelpScreenId());
177 $help_screen_id = $this->help_request->getHelpScreenId();
178 } else {
179 $help_screen_id = ilSession::get("help_screen_id");
180 }
181
182 ilSession::set("help_search_term", "");
183
184 $this->resetCurrentPage();
185
186 $id_arr = explode(".", $help_screen_id);
187 $help_arr = $this->help_map->getHelpSectionsForId($id_arr[0], (int) $id_arr[1]);
188
189 if (count($help_arr) > 0) {
190 $acc = new ilAccordionGUI();
191 $acc->setId("oh_acc");
192 $acc->setUseSessionStorage(true);
193 $acc->setBehaviour(ilAccordionGUI::FIRST_OPEN);
194
195 foreach ($help_arr as $h_id) {
196 $st_id = $h_id;
197 if (!ilLMObject::_exists($st_id)) {
198 continue;
199 }
200 $oh_lm_id = ilLMObject::_lookupContObjID($st_id);
201 $pages = ilLMObject::getPagesOfChapter($oh_lm_id, $st_id);
202 $items = [];
203 foreach ($pages as $pg) {
204 $items[] = $this->ui->factory()->button()->shy(
205 $this->replaceMenuItemTags(ilLMObject::_lookupTitle($pg["child"])),
206 "#"
207 )->withOnLoadCode(function ($id) use ($pg) {
208 return "document.getElementById('$id').addEventListener('click', () => {return il.Help.showPage(" . $pg["child"] . ");})";
209 });
210 }
211 $list = $this->ui->factory()->listing()->unordered($items);
212 $acc->addItem(ilLMObject::_lookupTitle($st_id), $this->ui->renderer()->renderAsync($list));
213 }
214
215 $h_tpl = new ilTemplate("tpl.help.html", true, true, "components/ILIAS/Help");
216 $h_tpl->setVariable("HEAD", $lng->txt("help"));
217
218 $h_tpl->setCurrentBlock("search");
219 $h_tpl->setVariable("GL_SEARCH", $this->symbol()->glyph("search")->render());
220 $h_tpl->setVariable("HELP_SEARCH_LABEL", $this->lng->txt("help_search_label"));
221 $h_tpl->parseCurrentBlock();
222
223 if (count($help_arr) > 0) {
224 $h_tpl->setVariable("CONTENT", $acc->getHTML(true));
225 } else {
226 $mess = $ui->factory()->messageBox()->info($lng->txt("help_no_content"));
227 $h_tpl->setVariable("CONTENT", $ui->renderer()->render([$mess]));
228 }
229
230 $h_tpl->setVariable("CLOSE_IMG", $this->symbol()->glyph("close")->render());
231 echo $h_tpl->get();
232 }
233 exit;
234 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
replaceMenuItemTags(string $content)
static getPagesOfChapter(int $a_lm_id, int $a_chap_id)
Get pages of chapter.
static _exists(int $a_id)
checks wether a lm content object with specified id exists or not
static _lookupContObjID(int $a_id)
get learning module id for lm object
loadLanguageModule(string $a_module)
Load language module.

References $id, $lng, ilLMObject\_exists(), ilLMObject\_lookupContObjID(), ilLMObject\_lookupTitle(), exit, ilAccordionGUI\FIRST_OPEN, ilSession\get(), ilLMObject\getPagesOfChapter(), ILIAS\Repository\lng(), ilSession\set(), ILIAS\Repository\symbol(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ showPage()

ilHelpGUI::showPage ( )

Definition at line 236 of file class.ilHelpGUI.php.

236 : void
237 {
239 $ui = $this->ui;
240
241 $page_id = $this->help_request->getHelpPage();
242
243 $h_tpl = new ilTemplate("tpl.help.html", true, true, "components/ILIAS/Help");
244
245 if (($t = ilSession::get("help_search_term")) != "") {
246 $back_button = $ui->factory()->button()->bulky($ui->factory()->symbol()->glyph()->back(), $lng->txt("back"), "#")->withOnLoadCode(function ($id) use ($t) {
247 return
248 "$(\"#$id\").click(function() { return il.Help.search('" . ilLegacyFormElementsUtil::prepareFormOutput(
249 $t
250 ) . "'); return false;});";
251 });
252 } else {
253 $back_button = $ui->factory()->button()->bulky($ui->factory()->symbol()->glyph()->back(), $lng->txt("back"), "#")->withOnLoadCode(function ($id) {
254 return
255 "$(\"#$id\").click(function() { return il.Help.listHelp(event, true); return false;});";
256 });
257 }
258 $h_tpl->setVariable("BACKBUTTON", $ui->renderer()->renderAsync($back_button));
259
260 $h_tpl->setVariable(
261 "HEAD",
263 );
264
265 if (!ilPageUtil::_existsAndNotEmpty("lm", $page_id)) {
266 exit;
267 }
268
269 // get page object
270 $page_gui = new ilLMPageGUI($page_id);
271 $cfg = $page_gui->getPageConfig();
272 $page_gui->setPresentationTitle("");
273 $page_gui->setTemplateOutput(false);
274 $page_gui->setHeader("");
275 $page_gui->setRawPageContent(true);
276 $cfg->setEnablePCType("Map", false);
277 $cfg->setEnablePCType("Tabs", false);
278 $cfg->setEnablePCType("FileList", false);
279
280 $page_gui->getPageObject()->buildDom();
281 $int_links = $page_gui->getPageObject()->getInternalLinks();
282 $link_xml = $this->getLinkXML($int_links);
283 $link_xml .= $this->getLinkTargetsXML();
284 //echo htmlentities($link_xml);
285 $page_gui->setLinkXml($link_xml);
286
287 $ret = $this->replaceMenuItemTags($page_gui->showPage());
288
289 $h_tpl->setVariable("CONTENT", $ret);
290 $h_tpl->setVariable("CLOSE_IMG", $this->symbol()->glyph("close")->render());
291
292 ilSession::set("help_pg", $page_id);
293
294 $page = $h_tpl->get();
295
296 // replace style classes
297 //$page = str_replace("ilc_text_inline_Strong", "ilHelpStrong", $page);
298
299 echo $page;
300 exit;
301 }
getLinkXML(array $a_int_links)
getLinkTargetsXML()
Get XMl for Link Targets.
Extension of ilPageObjectGUI for learning modules.
static _existsAndNotEmpty(string $a_parent_type, int $a_id, string $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)

References $id, $lng, ilPageUtil\_existsAndNotEmpty(), ilLMObject\_lookupTitle(), exit, ilSession\get(), ilLegacyFormElementsUtil\prepareFormOutput(), ilSession\set(), ILIAS\Repository\symbol(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

+ Here is the call graph for this function:

◆ showTooltips()

ilHelpGUI::showTooltips ( )

Definition at line 558 of file class.ilHelpGUI.php.

558 : bool
559 {
560 return $this->presentation->showTooltips();
561 }

◆ symbol()

ilHelpGUI::symbol ( )
protected

Definition at line 81 of file class.ilHelpGUI.php.

82 {
83 global $DIC;
84 return $DIC->repository()->internal()->gui()->symbol();
85 }

References $DIC.

Field Documentation

◆ $ctrl

ilCtrl ilHelpGUI::$ctrl
protected

Definition at line 40 of file class.ilHelpGUI.php.

◆ $def_screen_id

array ilHelpGUI::$def_screen_id = array()

Definition at line 45 of file class.ilHelpGUI.php.

◆ $gui

ILIAS Repository InternalGUIService ilHelpGUI::$gui
protected

Definition at line 34 of file class.ilHelpGUI.php.

Referenced by initUI().

◆ $help_map

ILIAS Help Map MapManager ilHelpGUI::$help_map
protected

Definition at line 37 of file class.ilHelpGUI.php.

◆ $help_request

StandardGUIRequest ilHelpGUI::$help_request
protected

Definition at line 38 of file class.ilHelpGUI.php.

◆ $help_sections

array ilHelpGUI::$help_sections = array()

Definition at line 44 of file class.ilHelpGUI.php.

◆ $internal_service

ILIAS Help InternalService ilHelpGUI::$internal_service = null
staticprotected

Definition at line 35 of file class.ilHelpGUI.php.

◆ $lng

ilLanguage ilHelpGUI::$lng
protected

Definition at line 42 of file class.ilHelpGUI.php.

◆ $observer

HelpScreenIdObserver ilHelpGUI::$observer
protected

Definition at line 33 of file class.ilHelpGUI.php.

◆ $presentation

ILIAS Help Presentation PresentationManager ilHelpGUI::$presentation
protected

Definition at line 36 of file class.ilHelpGUI.php.

◆ $raw_menu_items

array ilHelpGUI::$raw_menu_items = null
protected

Definition at line 49 of file class.ilHelpGUI.php.

◆ $screen_id

array ilHelpGUI::$screen_id = array()

Definition at line 46 of file class.ilHelpGUI.php.

◆ $screen_id_component

string ilHelpGUI::$screen_id_component = ''
protected

Definition at line 47 of file class.ilHelpGUI.php.

◆ $settings

ilSetting ilHelpGUI::$settings
protected

Definition at line 41 of file class.ilHelpGUI.php.

◆ $ui

ILIAS DI UIServices ilHelpGUI::$ui
protected

Definition at line 48 of file class.ilHelpGUI.php.

◆ $user

ilObjUser ilHelpGUI::$user
protected

Definition at line 43 of file class.ilHelpGUI.php.

◆ ID_PART_COMPONENT

const ilHelpGUI::ID_PART_COMPONENT = "component"

Definition at line 32 of file class.ilHelpGUI.php.

◆ ID_PART_SCREEN

const ilHelpGUI::ID_PART_SCREEN = "screen"

◆ ID_PART_SUB_SCREEN

const ilHelpGUI::ID_PART_SUB_SCREEN = "sub_screen"

Definition at line 31 of file class.ilHelpGUI.php.


The documentation for this class was generated from the following file: