From f16c5a38a85270e2230d78ab355774238a325f5d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 1 Sep 2015 10:20:54 +0200 Subject: [PATCH] Add language to the preparation method --- lib/private/notification/manager.php | 5 +++-- lib/public/notification/inotifier.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/private/notification/manager.php b/lib/private/notification/manager.php index 93062ae14d..0b3b68a406 100644 --- a/lib/private/notification/manager.php +++ b/lib/private/notification/manager.php @@ -128,16 +128,17 @@ class Manager implements IManager { /** * @param INotification $notification + * @param string $languageCode The code of the language that should be used to prepare the notification * @return INotification * @throws \InvalidArgumentException When the notification was not prepared by a notifier * @since 8.2.0 */ - public function prepare(INotification $notification) { + public function prepare(INotification $notification, $languageCode) { $notifiers = $this->getNotifiers(); foreach ($notifiers as $notifier) { try { - $notifier->prepare($notification); + $notifier->prepare($notification, $languageCode); } catch (\InvalidArgumentException $e) {} } diff --git a/lib/public/notification/inotifier.php b/lib/public/notification/inotifier.php index be6b3f2553..9eefcddae1 100644 --- a/lib/public/notification/inotifier.php +++ b/lib/public/notification/inotifier.php @@ -34,9 +34,10 @@ namespace OCP\Notification; interface INotifier { /** * @param INotification $notification + * @param string $languageCode The code of the language that should be used to prepare the notification * @return INotification * @throws \InvalidArgumentException When the notification was not prepared by a notifier * @since 8.2.0 */ - public function prepare(INotification $notification); + public function prepare(INotification $notification, $languageCode); }