X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FNotifications%2FNotifications.php;h=7852f81c2430e613ebb9cba837cf1e5ddd04ff59;hb=f0743e4e128dfcb5d6305f4ed09e969573ba6b15;hp=269acb79db31fc38ab1c921d3acc563e2994189f;hpb=3bae52074a644b0ade3808bed9fc1268e1baa4e3;p=friendica.git diff --git a/src/Module/Notifications/Notifications.php b/src/Module/Notifications/Notifications.php index 269acb79db..7852f81c24 100644 --- a/src/Module/Notifications/Notifications.php +++ b/src/Module/Notifications/Notifications.php @@ -1,6 +1,6 @@ formattedNotificationFactory = $formattedNotificationFactory; - $this->baseUrl = $baseUrl; + $this->formattedNotifyFactory = $formattedNotifyFactory; } /** @@ -60,30 +60,30 @@ class Notifications extends BaseNotifications $notificationHeader = ''; $notifications = []; - $factory = $this->formattedNotificationFactory; + $factory = $this->formattedNotifyFactory; if (($this->args->get(1) == 'network')) { $notificationHeader = $this->t('Network Notifications'); $notifications = [ - 'ident' => FormattedNotification::NETWORK, + 'ident' => FormattedNotify::NETWORK, 'notifications' => $factory->getNetworkList($this->showAll, $this->firstItemNum, self::ITEMS_PER_PAGE), ]; } elseif (($this->args->get(1) == 'system')) { $notificationHeader = $this->t('System Notifications'); $notifications = [ - 'ident' => FormattedNotification::SYSTEM, + 'ident' => FormattedNotify::SYSTEM, 'notifications' => $factory->getSystemList($this->showAll, $this->firstItemNum, self::ITEMS_PER_PAGE), ]; } elseif (($this->args->get(1) == 'personal')) { $notificationHeader = $this->t('Personal Notifications'); $notifications = [ - 'ident' => FormattedNotification::PERSONAL, + 'ident' => FormattedNotify::PERSONAL, 'notifications' => $factory->getPersonalList($this->showAll, $this->firstItemNum, self::ITEMS_PER_PAGE), ]; } elseif (($this->args->get(1) == 'home')) { $notificationHeader = $this->t('Home Notifications'); $notifications = [ - 'ident' => FormattedNotification::HOME, + 'ident' => FormattedNotify::HOME, 'notifications' => $factory->getHomeList($this->showAll, $this->firstItemNum, self::ITEMS_PER_PAGE), ]; } else { @@ -96,7 +96,7 @@ class Notifications extends BaseNotifications ]; } - public function content(): string + protected function content(array $request = []): string { Nav::setSelected('notifications'); @@ -121,7 +121,7 @@ class Notifications extends BaseNotifications ]; // Loop trough ever notification This creates an array with the output html for each // notification and apply the correct template according to the notificationtype (label). - /** @var FormattedNotification $Notification */ + /** @var FormattedNotify $Notification */ foreach ($notifications['notifications'] as $Notification) { $notificationArray = $Notification->toArray();