19 declare(strict_types=1);
45 $settings =
new ilSetting(
'notifications');
51 foreach ($osd_notification_handler->getOSDNotificationsForUser(
52 $this->dic->user()->getId(),
54 time() - ($this->dic->http()->request()->getQueryParams()[
'max_age'] ?? time())
56 $type = $notification->getType();
57 $toast = $this->toast_factory
59 $this->
if->identifier((
string) $notification->getId()),
60 $notification->getObject()->title
63 ->withDescription($notification->getObject()->shortDescription)
64 ->withClosedCallable(
static function () use ($osd_repository, $notification) {
65 $osd_repository->deleteOSDNotificationById($notification->getId());
68 foreach ($notification->getObject()->links as
$id => $link) {
69 $toast = $toast->withAdditionToastAction(
70 $this->toast_factory->action(
71 $notification->getId() .
'_link_' .
$id,
73 function () use ($link, $osd_repository, $notification):
void {
74 $osd_repository->deleteOSDNotificationById($notification->getId());
75 $this->dic->ctrl()->redirectToURL($link->getUrl());
90 case BadgeNotificationProvider::NOTIFICATION_TYPE:
91 $name = Standard::BDGA;
93 case ChatInvitationNotificationProvider::NOTIFICATION_TYPE:
94 $name = Standard::CHTA;
96 case ContactNotificationProvider::NOTIFICATION_TYPE:
97 $name = Standard::CADM;
100 $name = Standard::LSO;
104 return $this->dic->ui()->factory()->symbol()->icon()->standard($name, $type);
if(!file_exists('../ilias.ini.php'))
getIconByType(string $type)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins