ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
class.ilHelpMetaBarProvider.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
20
use
ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
;
21
use
ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider
;
22
use
ILIAS\UI\Implementation\Component\Button\Bulky
as BulkyButton;
23
use
ILIAS\UI\Implementation\Component\Link\Bulky
as BulkyLink;
24
25
class
ilHelpMetaBarProvider
extends
AbstractStaticMetaBarProvider
26
{
27
use ilHelpDisplayed;
28
29
private
function
getId
():
IdentificationInterface
30
{
31
return
$this->
if
->identifier(
'help'
);
32
}
33
34
public
function
getMetaBarItems
(): array
35
{
36
global
$DIC
;
37
38
$mb = $this->
globalScreen
()->metaBar();
39
40
$f
= $DIC->ui()->factory();
41
42
$title =
$DIC
->language()->txt(
"help"
);
43
44
if
($this->showHelpTool()) {
45
// position should be 0, see bug #26794
46
$item = $mb->topLinkItem($this->
getId
())
47
->addComponentDecorator(
static
function
(
ILIAS
\UI\
Component
\
Component
$c
): ?
ILIAS
\UI\
Component
\
Component
{
48
if
(
$c
instanceof BulkyButton ||
$c
instanceof BulkyLink) {
49
return
$c
->withAdditionalOnLoadCode(
static
function
(
string
$id
):
string
{
50
return
"$('#$id').on('click', function() {
51
$('body').trigger('il-help-toggle-slate');
52
return false;
53
})"
;
54
});
55
}
56
return
null
;
57
})
58
->
withSymbol
(
$f
->symbol()->glyph()->help())
59
->withTitle($title)
60
->withPosition(0);
61
62
return
[$item];
63
}
64
65
return
[];
66
}
67
}
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen
globalScreen()
Definition:
AbstractProvider.php:38
ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
Interface AbstractStaticMetaBarProvider.
Definition:
AbstractStaticMetaBarProvider.php:33
ILIAS\UI\Implementation\Component\Button\Bulky
Bulky Button.
Definition:
Bulky.php:30
ILIAS\UI\Implementation\Component\Link\Bulky
Definition:
Bulky.php:28
ilHelpMetaBarProvider
Definition:
class.ilHelpMetaBarProvider.php:26
ilHelpMetaBarProvider\getMetaBarItems
getMetaBarItems()
Definition:
class.ilHelpMetaBarProvider.php:34
ilHelpMetaBarProvider\getId
getId()
Definition:
class.ilHelpMetaBarProvider.php:29
$c
$c
Definition:
deliver.php:25
ILIAS\GlobalScreen\Identification\IdentificationInterface
Interface IdentificationInterface.
Definition:
IdentificationInterface.php:30
ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider
Class StaticMetaBarProvider.
Definition:
StaticMetaBarProvider.php:31
ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol
withSymbol(Symbol $symbol)
@inheritDoc
Definition:
hasSymbolTrait.php:39
ILIAS\UI\Component
ILIAS
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
Definition:
AccessControl.php:21
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
Help
GlobalScreen
classes
class.ilHelpMetaBarProvider.php
Generated on Sat Oct 18 2025 23:03:09 for ILIAS by
1.9.4 (using
Doxyfile
)