19declare(strict_types=1);
24use ILIAS\GlobalScreen\Collector\Renderer\isSupportedTrait;
38 private \ILIAS\GlobalScreen\Services
$gs;
48 $this->gs =
$DIC->globalScreen();
49 $this->
lng = $DIC->language();
59 $f = $this->
ui->factory();
61 $center =
$f->mainControls()->slate()->combined($this->
lng->txt(
"noc"), $this->buildIcon($item))
64 foreach ($this->gs->collector()->notifications()->getNotifications() as $notification) {
65 $center = $center->withAdditionalEntry($notification->getRenderer($this->ui->factory())->getNotificationComponentForItem($notification));
86 function (
$id) use ($toggle_signal,
$url) {
88 $(document).on('$toggle_signal', function(event, signalData) {
89 $.ajax({url: '$url'});
106 function (
string $id) use (
$url):
string {
107 return "document.addEventListener('rerenderNotificationCenter', () => {
108 let xhr = new XMLHttpRequest();
109 xhr.open('GET', '$url');
111 if (xhr.status === 200) {
112 let response = JSON.parse(xhr.responseText);
113 $id.querySelector('.il-maincontrols-slate-content').innerHTML = response.html;
114 $id.querySelectorAll('.il-maincontrols-slate-content script').forEach( element => {
115 eval(element.innerHTML);
117 $id.parentNode.previousElementSibling.querySelector('.glyph').outerHTML = response.symbol;
119 console.error(xhr.status + ': ' + xhr.responseText);
133 return http_build_query([
134 ClientNotifications::MODE => ClientNotifications::MODE_OPENED,
135 ClientNotifications::NOTIFICATION_IDENTIFIERS => $this->gs->collector()->notifications()->getNotificationsIdentifiersAsArray(
true),
141 return http_build_query([ClientNotifications::MODE => ClientNotifications::MODE_RERENDER]);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
A component is the most general form of an entity in the UI.
withAdditionalOnLoadCode(Closure $binder)
Add some onload-code to the component instead of replacing the existing one.
This describes the Combined Slate.
getToggleSignal()
Signal that toggles the slate when triggered.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.