ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
NotificationProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28use Closure;
30
35{
36 protected \ILIAS\Help\GuidedTour\Admin\AdminManager $gd_admin;
37 protected \ILIAS\GlobalScreen\Helper\BasicAccessCheckClosures $access;
38
39 public function __construct(Container $dic)
40 {
43 $this->gd_admin = $dic->help()->internal()->domain()->guidedTour()->admin();
44 }
45
46 public function getNotifications(): array
47 {
48 return [];
49 }
50
51 public function getAdministrativeNotifications(): array
52 {
53 $screen_id_visible = $this->gd_admin->areIdentifiersVisible();
54 if (defined("OH_REF_ID") && (int) OH_REF_ID > 0) {
55 $screen_id_visible = true;
56 }
57 if (!$screen_id_visible) {
58 return [];
59 }
60
61 $adns = [];
62 $i = fn(string $id): IdentificationInterface => $this->if->identifier($id);
63
65 $help_gui = $this->dic->help();
66 $mt = $this->dic->ui()->mainTemplate();
67 $help_gui->initHelp($mt, "#");
68 $adn = $this->notification_factory->administrative($i("help_screen_id"))->withTitle("Screen ID:")->withSummary($help_gui->getScreenId());
69 $is_visible = static fn(): bool => true;
70 $adns[] = $adn->withVisibilityCallable($is_visible);
71 return $adns;
72 }
73}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
ILIAS GlobalScreen Helper BasicAccessCheckClosures $access
ILIAS Help GuidedTour Admin AdminManager $gd_admin
return true
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))