Add language to the preparation method

This commit is contained in:
Joas Schilling 2015-09-01 10:20:54 +02:00
parent 5437aeeaa2
commit f16c5a38a8
2 changed files with 5 additions and 3 deletions

View File

@ -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) {}
}

View File

@ -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);
}