Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-09-01 18:59:41 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-09-01 18:59:41 +0300
commit1ac644c753f3b9d4979e2dc314e46a674d01f549 (patch)
tree37013522a055f612c59caebf687548fa27db8fc1 /README.md
parentc3a0971bc1128cf303b0693dab32987634b68008 (diff)
Fix the blindly written docs
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index acd3bab..4c0db02 100644
--- a/README.md
+++ b/README.md
@@ -60,9 +60,9 @@ with it, we want to remove the notification again.
using a `\Closure`:
```php
$manager = \OC::$server->getNotificationManager();
- $manager->createNotification(function() {
+ $manager->registerNotifier(function() {
return new \OCA\Files_Sharing\Notifier(
- \OC::$server->getLanguageFactory()
+ \OC::$server->getL10NFactory()
);
});
```
@@ -94,7 +94,7 @@ with it, we want to remove the notification again.
// Deal with known subjects
case 'remote_share':
$notification->setParsedSubject(
- $l->t('You received the remote share "%s"', $notification->getSubjectParameters())
+ (string) $l->t('You received the remote share "%s"', $notification->getSubjectParameters())
);
// Deal with the actions for a known subject
@@ -102,13 +102,13 @@ with it, we want to remove the notification again.
switch ($action->getLabel()) {
case 'accept':
$action->setParsedLabel(
- $l->t('Accept');
+ (string) $l->t('Accept')
);
break;
case 'decline':
$action->setParsedLabel(
- $l->t('Decline');
+ (string) $l->t('Decline')
);
break;
}