19 declare(strict_types=1);
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));
87 function (
$id) use ($toggle_signal,
$url) {
89 $(document).on('$toggle_signal', function(event, signalData) { 90 $.ajax({url: '$url'}); 109 function (
string $id) use (
$url):
string {
110 return "document.addEventListener('rerenderNotificationCenter', () => { 111 let xhr = new XMLHttpRequest(); 112 xhr.open('GET', '$url'); 114 if (xhr.status === 200) { 115 let response = JSON.parse(xhr.responseText); 116 $id.querySelector('.il-maincontrols-slate-content').innerHTML = response.html; 117 $id.querySelectorAll('.il-maincontrols-slate-content script').forEach( element => { 118 eval(element.innerHTML); 120 $id.parentNode.previousElementSibling.querySelector('.glyph').outerHTML = response.symbol; 122 console.error(xhr.status + ': ' + xhr.responseText); 136 return http_build_query([
137 ClientNotifications::MODE => ClientNotifications::MODE_OPENED,
138 ClientNotifications::NOTIFICATION_IDENTIFIERS => $this->gs->collector()->notifications()->getNotificationsIdentifiersAsArray(
true),
144 return http_build_query([ClientNotifications::MODE => ClientNotifications::MODE_RERENDER]);
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getToggleSignal()
Signal that toggles the slate when triggered.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
withAdditionalOnLoadCode(Closure $binder)
Add some onload-code to the component instead of replacing the existing one.
This describes the Combined Slate.