ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilHelpMetaBarProvider Class Reference
+ Inheritance diagram for ilHelpMetaBarProvider:
+ Collaboration diagram for ilHelpMetaBarProvider:

Public Member Functions

 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 __construct (Container $dic)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\MetaBarProviderInterface
 getProviderNameForPresentation ()
 

Private Member Functions

 getId ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
Container $dic
 
IdentificationProviderInterface $if
 
MetaBarItemFactory $meta_bar
 

Detailed Description

Definition at line 25 of file class.ilHelpMetaBarProvider.php.

Member Function Documentation

◆ getId()

ilHelpMetaBarProvider::getId ( )
private

Definition at line 29 of file class.ilHelpMetaBarProvider.php.

30 {
31 return $this->if->identifier('help');
32 }

Referenced by getMetaBarItems().

+ Here is the caller graph for this function:

◆ getMetaBarItems()

ilHelpMetaBarProvider::getMetaBarItems ( )
Returns
isItem[]

Implements ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider.

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

34 : 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 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$c
Definition: deliver.php:25
withSymbol(Symbol $symbol)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26

References $c, $DIC, Vendor\Package\$f, $id, getId(), ILIAS\GlobalScreen\Provider\AbstractProvider\globalScreen(), and ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol().

+ Here is the call graph for this function:

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