19use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
39 return $this->context_collection->
main();
47 $help_gui =
$DIC[
"ilHelp"];
50 $lng->loadLanguageModule(
"help");
51 $f =
$DIC->ui()->factory();
55 $hidden = !$help_gui->isHelpPageActive();
57 $title =
$lng->txt(
"help");
58 $icon =
$f->symbol()->icon()->standard(
"hlps", $title);
60 if ($this->showHelpTool()) {
61 $iff =
function (
$id) {
62 return $this->identification_provider->contextAwareIdentifier(
$id,
true);
64 $l =
function (
string $content) {
65 return $this->dic->ui()->factory()->legacy()->content($content);
68 $identification = $iff(
"help");
69 $hashed = $this->hash($identification->serialize());
70 $tools[] = $this->
factory->tool($identification)
72 if (
$c instanceof LegacySlate) {
73 $signal_id =
$c->getToggleSignal()->
getId();
74 return $c->withAdditionalOnLoadCode(
static function (
$id) use ($hashed) {
76 $('body').on('il-help-toggle-slate', function(){
77 if (!$('#$id').hasClass('disengaged')) {
78 il.Help.resetCurrentPage();
79 il.UI.maincontrols.mainbar.removeTool('$hashed');
81 il.UI.maincontrols.mainbar.engageTool('$hashed');
82 const panel = document.getElementById('ilHelpPanel');
83 const firstFocusElement = panel.querySelector('a,input,[role=\'button\'],button');
84 if (firstFocusElement) {
85 firstFocusElement.focus();
93 ->withInitiallyHidden($hidden)
96 ->withContentWrapper(
function () use ($l) {
97 return $l($this->getHelpContent());
105 private function getHelpContent(): string
109 $ctrl =
$DIC->ctrl();
110 $main_tpl =
$DIC->ui()->mainTemplate();
113 $help_gui =
$DIC[
"ilHelp"];
115 $help_gui->initHelp($main_tpl, $ctrl->getLinkTargetByClass(
"ilhelpgui",
"",
"",
true));
118 if ((defined(
"OH_REF_ID") && (
int) OH_REF_ID > 0) || (defined(
'DEVMODE') && (
int) DEVMODE === 1)) {
119 $html =
"<div class='ilHighlighted small'>Screen ID: " . $help_gui->getScreenId() .
"</div>";
122 $html .=
"<div id='ilHelpPanel'> </div>";
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
trait JavaScriptBindable
Trait for components implementing JavaScriptBindable providing standard implementation.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.