ILIAS  release_7 Revision v7.30-3-g800a261c036
StandardNotification.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
22use ILIAS\UI\Component\Item\Notification as NotificationItem;
23
30{
41 private $old_amount = 0;
47 private $new_amount = 1;
48
49 public function withNotificationItem(NotificationItem $notification_item) : self
50 {
51 $clone = clone $this;
52 $clone->notification_item = $notification_item;
53
54 return $clone;
55 }
56
60 public function getNotificationItem() : NotificationItem
61 {
63 }
64
68 public function withOldAmount(int $amount = 0) : StandardNotification
69 {
70 $clone = clone $this;
71 $clone->old_amount = $amount;
72
73 return $clone;
74 }
75
79 public function withNewAmount(int $amount = 0) : StandardNotification
80 {
81 $clone = clone $this;
82 $clone->new_amount = $amount;
83
84 return $clone;
85 }
86
90 public function getOldAmount() : int
91 {
92 return $this->old_amount;
93 }
94
98 public function getNewAmount() : int
99 {
100 return $this->new_amount;
101 }
102}
An exception for terminatinating execution or to throw for unit testing.
Class Notification The default Notification mapping currently to one UI Notification Item component.
getNewAmount()
Get the amount of new notes, the notification contains.int
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
Interface hasAmount Items can implicitly contain a various amount of news.
Definition: hasAmount.php:31