19declare(strict_types=1);
25use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
75 yield
$provider->getAdministrativeNotifications();
116 return (is_array($this->notifications) && $this->notifications !== []);
133 if (is_array($this->notifications)) {
135 foreach ($this->notifications as $notification) {
137 foreach ($notification->getNotifications() as $s_notification) {
138 if ($s_notification->getOldAmount() > 0) {
142 } elseif ($notification->getOldAmount() > 0) {
160 if (is_array($this->notifications)) {
162 foreach ($this->notifications as $notification) {
164 foreach ($notification->getNotifications() as $s_notification) {
165 if ($s_notification->getNewAmount() > 0) {
169 } elseif ($notification->getNewAmount() > 0) {
203 foreach ($this->notifications as $notification) {
205 foreach ($notification->getNotifications() as $item) {
207 $identifiers[] = $this->hash($item->getProviderIdentification()->serialize());
209 $identifiers[] = $item->getProviderIdentification()->serialize();
214 $identifiers[] = $this->hash($notification->getProviderIdentification()->serialize());
216 $identifiers[] = $notification->getProviderIdentification()->serialize();
Class AbstractBaseCollector.
collectOnce()
Runs the Collection of all items from the providers.
Class MainNotificationCollector.
filterItemsByVisibilty(bool $async_only=false)
getAmountOfOldNotifications()
Returns the sum of all old notifications values in the Standard Notifications.
getAmountOfNewNotifications()
Returns the sum of all new notifications values in the Standard Notifications.
getItemsForUIRepresentation()
@inheritDoc
getNotificationsIdentifiersAsArray(bool $hashed=false)
sortItemsForUIRepresentation()
returnNotificationsFromProviders()
Generator yielding the Notifications from the set of providers.
__construct(private array $providers)
MetaBarMainCollector constructor.
getNotifications()
Returns the set of collected informations.
returnAdministrativeNotificationsFromProviders()
cleanupItemsForUIRepresentation()
array $administrative_notifications
getAdministrativeNotifications()
prepareItemsForUIRepresentation()
Class StandardNotificationGroup Groups a set of Notification.
Interface NotificationProvider.