ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
AdministrativeNotificationRenderer.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 use ILIAS\Data\URI;
25 use ILIAS\GlobalScreen\Client\Notifications as ClientNotifications;
28 
34 {
35  use Hasher;
36 
40  public function getNotificationComponentForItem(isItem $item): Component
41  {
45  $system_info = $this->ui_factory->mainControls()->systemInfo($item->getTitle(), $item->getSummary())->withDenotation($item->getDenotation());
46 
47  if ($item->hasClosedCallable()) {
48  $url = rtrim(
49  ILIAS_HTTP_PATH,
50  "/"
51  ) . "/" . ClientNotifications::NOTIFY_ENDPOINT . "?" . $this->buildCloseQuery($item);
52  $system_info = $system_info->withDismissAction(new URI($url));
53  }
54 
55  return $system_info;
56  }
57 }
getNotificationComponentForItem(isItem $item)
Returns the UI Component for the past item.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$url
Definition: shib_logout.php:66
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface NotificationRenderer Every Notification should have a renderer, if you won&#39;t provide on in ...