- /** @var Notification $notification */
- foreach ($notifications['notifications'] as $notification) {
- $notification_templates = [
- 'like' => 'notifications/likes_item.tpl',
- 'dislike' => 'notifications/dislikes_item.tpl',
- 'attend' => 'notifications/attend_item.tpl',
- 'attendno' => 'notifications/attend_item.tpl',
- 'attendmaybe' => 'notifications/attend_item.tpl',
- 'friend' => 'notifications/friends_item.tpl',
- 'comment' => 'notifications/comments_item.tpl',
- 'post' => 'notifications/posts_item.tpl',
- 'notification' => 'notifications/notification.tpl',
- ];
-
- $notificationTemplate = Renderer::getMarkupTemplate($notification_templates[$notification->getLabel()]);
+ /** @var FormattedNotify $Notification */
+ foreach ($notifications['notifications'] as $Notification) {
+ $notificationArray = $Notification->toArray();
+
+ $notificationTemplate = Renderer::getMarkupTemplate($notificationTemplates[$notificationArray['label']]);