ILIAS  release_8 Revision v8.24
StandardNotification.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
21
22use ILIAS\UI\Component\Item\Notification as NotificationItem;
23
30{
34 private NotificationItem $notification_item;
39 private int $old_amount = 0;
44 private int $new_amount = 1;
45
46 public function withNotificationItem(NotificationItem $notification_item): self
47 {
48 $clone = clone $this;
49 $clone->notification_item = $notification_item;
50
51 return $clone;
52 }
53
57 public function getNotificationItem(): NotificationItem
58 {
60 }
61
65 public function withOldAmount(int $amount = 0): StandardNotification
66 {
67 $clone = clone $this;
68 $clone->old_amount = $amount;
69
70 return $clone;
71 }
72
76 public function withNewAmount(int $amount = 0): StandardNotification
77 {
78 $clone = clone $this;
79 $clone->new_amount = $amount;
80
81 return $clone;
82 }
83
87 public function getOldAmount(): int
88 {
89 return $this->old_amount;
90 }
91
95 public function getNewAmount(): int
96 {
97 return $this->new_amount;
98 }
99}
Class Notification The default Notification mapping currently to one UI Notification Item component.
getNewAmount()
Get the amount of new notes, the notification contains.int
int $new_amount
Amount of old notes, the notification contains.
NotificationItem $notification_item
UI Component mapping to this item.
withNewAmount(int $amount=0)
Set the amount of new notes, the notification contains.StandardNotification
getOldAmount()
Get the amount of new notes, the notification contains.int
withOldAmount(int $amount=0)
Set the amount of old notes, the notification contains.StandardNotification
int $old_amount
Amount of old notes, the notification contains.
Interface hasAmount Items can implicitly contain a various amount of news.
Definition: hasAmount.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...